Hi Stefan!
On Wed, Feb 12, 2014 at 12:35 PM, Stefan Marr <[hidden email]> wrote:
Fab! This is great.
How can anyone do anything significant with the VM without getting the simulator to work? [ ;-) ] You know about the first attempt at making a 64-bit VM for HP don't you? A nightmare tale :-).
Hmm. What's the easiest way to map this to a Monticello mcz so I can integrate your changes back into my packages?
best, Eliot
|
On 13 Feb 2014, at 05:46, Eliot Miranda <[hidden email]> wrote:
give me some days… I have in my todo list to create a jenkins job to upload the mcz to source.squeak.org (you asked for it more or less in december, but I didn’t had the time until now, sorry). Esteban
|
In reply to this post by Eliot Miranda-2
Hi Eliot: On 13 Feb 2014, at 05:46, Eliot Miranda <[hidden email]> wrote: > Hmm. What’s the easiest way to map this to a Monticello mcz so I can integrate your changes back into my packages? I think the bigger question is whether you actually want to adopt those things. If you skim over the diffs on Github [1], you will probably find that most of the changes are necessary to adopt Pharo-specific API changes. Not sure what the best way forward would be to avoid having the two Squeak and Pharo flavors diverge even more. I am open to suggestions, don’t have a good idea how to properly ‘modularize’ these differences myself… Best regards Stefan [1] https://github.com/pharo-project/pharo-vm/pull/18 -- Stefan Marr INRIA Lille - Nord Europe http://stefan-marr.de/research/ |
> Stefan Marr > > Hi Eliot: > > On 13 Feb 2014, at 05:46, Eliot Miranda <[hidden email]> wrote: > > > Hmm. What's the easiest way to map this to a Monticello mcz so I can > integrate your changes back into my packages? > > I think the bigger question is whether you actually want to adopt those That the vm says in sync should be a core requirement for our communities. I realize that there is a split. There are some really great advancements going on in pharo-vm including new build methods and configurations. All of that has value if pharo can stay in sync with COG developments. It doesn't make sense to require Pharo developers to redo Eliot's work or to eliminate Pharo VM advancements from the Squeak / Newspeak community. The VM is the one place where we can continue to work together for the benefit of all three communities. We should not, if at all possible, diverge, lest we lose some excellent contributions from some really terrific people, in one or another community. All the best, Ron Teitelbaum > If you skim over the diffs on Github [1], you will probably find that most of the > changes are necessary to adopt Pharo-specific API changes. > Not sure what the best way forward would be to avoid having the two Squeak > and Pharo flavors diverge even more. > > I am open to suggestions, don't have a good idea how to properly 'modularize' > these differences myself. > > Best regards > Stefan > > [1] https://github.com/pharo-project/pharo-vm/pull/18 > > -- > Stefan Marr > INRIA Lille - Nord Europe > http://stefan-marr.de/research/ > > > > |
Hi Ron: On 13 Feb 2014, at 10:38, Ron Teitelbaum <[hidden email]> wrote: >> I think the bigger question is whether you actually want to adopt those > things. > > That the vm stays in sync should be a core requirement for our communities. I am with you on that Ron. But I need a technical solution to manage those things. Good intensions are one thing, but how do we do that? Examples: [https://github.com/pharo-project/pharo-vm/pull/18/commits] primitiveUpdateGZipCrc32 - self cCode:'' inSmalltalk:[zipCrcTable := CArrayAccessor on: GZipWriteStream crcTable]. + self cCode:’' inSmalltalk:[zipCrcTable := CArrayAccessor on: CRC crc32Table]. primitiveGetAttribute - attribute := Smalltalk getSystemAttribute: attr. + attribute := Smalltalk vm getSystemAttribute: attr. CogVMSimulator>> initialize - 'Display has not yet been installed' asDisplayText form. + 'Display has not yet been installed' asMorph imageForm. ioRelinquishProcessorForMicroseconds - Processor activeProcess == Project uiProcess ifTrue: + Processor activeProcess == UIManager default uiProcess ifTrue: And so far, I only fixed trivial things. Still need to figure out what is going wrong with more recent Pharo images. Best regards Stefan -- Stefan Marr INRIA Lille - Nord Europe http://stefan-marr.de/research/ |
> Stefan Marr > Hi Ron: > > On 13 Feb 2014, at 10:38, Ron Teitelbaum <[hidden email]> wrote: > > >> I think the bigger question is whether you actually want to adopt those > > things. > > > > That the vm stays in sync should be a core requirement for our communities. > > I am with you on that Ron. But I need a technical solution to manage those > things. > Good intensions are one thing, but how do we do that? > I think the answer is one at a time. With some collaboration and negotiation. Refactoring is fine as long as it provides some value. It doesn't have to be a change in function, a change in clarity suffices in my opinion. The benefit needs to be worth the pain of change. Where we can agree on the benefit the three communities should adopt it. Where we disagree, each community should take on the pain of supporting their version and we diverge. I'm confident that Eliot can manage to sync up what makes sense. Hopefully he can also push back on what doesn't and you can sync up on his changes or concerns. With the good intention as a core goal on all sides, proper action follows. All of this gets easier if we collaborate up front instead of trying to sync after the fact. All the best, Ron Teitelbaum > Examples: [https://github.com/pharo-project/pharo-vm/pull/18/commits] > > primitiveUpdateGZipCrc32 > - self cCode:'' inSmalltalk:[zipCrcTable := CArrayAccessor on: > GZipWriteStream crcTable]. > + self cCode:'' inSmalltalk:[zipCrcTable := CArrayAccessor on: CRC > crc32Table]. > > primitiveGetAttribute > > - attribute := Smalltalk getSystemAttribute: attr. > + attribute := Smalltalk vm getSystemAttribute: attr. > > CogVMSimulator>> initialize > - 'Display has not yet been installed' asDisplayText form. > + 'Display has not yet been installed' asMorph imageForm. > > > ioRelinquishProcessorForMicroseconds > - Processor activeProcess == Project uiProcess ifTrue: > + Processor activeProcess == UIManager default uiProcess ifTrue: > > > And so far, I only fixed trivial things. Still need to figure out what is > with more recent Pharo images. > > Best regards > Stefan > > -- > Stefan Marr > INRIA Lille - Nord Europe > http://stefan-marr.de/research/ > > > > |
In reply to this post by Stefan Marr-3
Hi Folks, (below) Quoting Stefan Marr <[hidden email]>: > Hi Ron: > > On 13 Feb 2014, at 10:38, Ron Teitelbaum <[hidden email]> wrote: > >>> I think the bigger question is whether you actually want to adopt those >> things. >> >> That the vm stays in sync should be a core requirement for our communities. > > I am with you on that Ron. But I need a technical solution to manage > those things. > Good intensions are one thing, but how do we do that? > > Examples: [https://github.com/pharo-project/pharo-vm/pull/18/commits] > > primitiveUpdateGZipCrc32 > - self cCode:'' inSmalltalk:[zipCrcTable := CArrayAccessor on: > GZipWriteStream crcTable]. > + self cCode:’' inSmalltalk:[zipCrcTable := CArrayAccessor on: CRC > crc32Table]. > > primitiveGetAttribute > > - attribute := Smalltalk getSystemAttribute: attr. > + attribute := Smalltalk vm getSystemAttribute: attr. > > CogVMSimulator>> initialize > - 'Display has not yet been installed' asDisplayText form. > + 'Display has not yet been installed' asMorph imageForm. > > > ioRelinquishProcessorForMicroseconds > - Processor activeProcess == Project uiProcess ifTrue: > + Processor activeProcess == UIManager default uiProcess ifTrue: > > > And so far, I only fixed trivial things. Still need to figure out > what is going wrong with more recent Pharo images. > > Best regards > Stefan > > -- > Stefan Marr > INRIA Lille - Nord Europe > http://stefan-marr.de/research/ All these can be handled without much trouble in a new package "VMMaker compatibility for Pharo" or such. Cheers, Juan Vuletich |
In reply to this post by Stefan Marr-3
On Thu, Feb 13, 2014 at 2:01 AM, Stefan Marr <[hidden email]> wrote:
I would implement isPharo/isSqueak/isNewspeak in VMClass. These can answer e.g. the value of a class variable. hence, below...
self cCode:'' inSmalltalk:[zipCrcTable := CArrayAccessor on: (self isPharo ifTrue: [CRC] ifFalse: [GZipWriteStream]) crcTable].
This is just my code base being a little out of date. Smalltalk vm getSystemAttribute: works in Squeak. I'll update my code.
CogVMSimulator>> initialize This needs to be isPharo.
Ditto, until Squeak changes?
But fab that the simulator is receiving attention on Pharo (and Tty's work with events is great too).
Now if there could be an automatic job to export whatever git state is the current official Pharo VM to a Monticello VMMaker package I'll be very much happier. Also for this discussion should we continue to cross-post or is vm-dev an adequate forum? Answers from Pharoites please... I have to admit that I'm a bit troubled by how often subjects that are clearly vm-centric are raised on pharo-dev. To Pharoites perceive vm-dev as a squeak thing? If so, may I suggest pharo-vm-dev? If not, can the Pharo community make an effort to direct vm discussion towards vm-dev in future?
Best regards best, Eliot
|
In reply to this post by Ron Teitelbaum
On Thu, Feb 13, 2014 at 6:19 AM, <[hidden email]> wrote: --
If you guys would read and contribute to vm-dev you'd already know that someone with no VM experience (tty) just implemented event processing for the simulator window. The simulator only supported the old polling event architecture. So no it's not too advanced. But more importantly why aren't you all discussing vm stuff on the vm forum?
cheers -ben best, Eliot
|
In reply to this post by J. Vuletich (mail lists)
Sorry for top posting. Juan is right. The kind of differences we are discussing here are related to user interface and file system differences in the various images, and this can be handled with a compatibility package for Pharo. It also can be done by merging into VMMaker (oscog branch), although this tends to get messy as Pharo diverges further from Squeak. I would defer to Eliot as to which approach he would prefer, since it most directly affects the oscog branch for now. But FWIW, I think that Juan's suggestion is the most straightforward and easiest to maintain over time. Dave > Hi Folks, > > (below) > > Quoting Stefan Marr <[hidden email]>: > >> Hi Ron: >> >> On 13 Feb 2014, at 10:38, Ron Teitelbaum <[hidden email]> wrote: >> >>>> I think the bigger question is whether you actually want to adopt >>>> those >>> things. >>> >>> That the vm stays in sync should be a core requirement for our >>> communities. >> >> I am with you on that Ron. But I need a technical solution to manage >> those things. >> Good intensions are one thing, but how do we do that? >> >> Examples: [https://github.com/pharo-project/pharo-vm/pull/18/commits] >> >> primitiveUpdateGZipCrc32 >> - self cCode:'' inSmalltalk:[zipCrcTable := CArrayAccessor on: >> GZipWriteStream crcTable]. >> + self cCode:â' inSmalltalk:[zipCrcTable := CArrayAccessor on: CRC >> crc32Table]. >> >> primitiveGetAttribute >> >> - attribute := Smalltalk getSystemAttribute: attr. >> + attribute := Smalltalk vm getSystemAttribute: attr. >> >> CogVMSimulator>> initialize >> - 'Display has not yet been installed' asDisplayText form. >> + 'Display has not yet been installed' asMorph imageForm. >> >> >> ioRelinquishProcessorForMicroseconds >> - Processor activeProcess == Project uiProcess ifTrue: >> + Processor activeProcess == UIManager default uiProcess ifTrue: >> >> >> And so far, I only fixed trivial things. Still need to figure out >> what is going wrong with more recent Pharo images. >> >> Best regards >> Stefan >> >> -- >> Stefan Marr >> INRIA Lille - Nord Europe >> http://stefan-marr.de/research/ > > All these can be handled without much trouble in a new package > "VMMaker compatibility for Pharo" or such. > > Cheers, > Juan Vuletich > > |
In reply to this post by Eliot Miranda-2
Hi Eliot: On 13 Feb 2014, at 18:26, Eliot Miranda <[hidden email]> wrote: > I would implement isPharo/isSqueak/isNewspeak in VMClass. These can answer e.g. the value of a class variable. hence, below… Hm, this looks really ugly, no? Perhaps with one more indirection of a proper helper method where it makes sense? Will try to look into it tomorrow. > Also for this discussion should we continue to cross-post or is vm-dev an adequate forum? Answers from Pharoites please... I have to admit that I'm a bit troubled by how often subjects that are clearly vm-centric are raised on pharo-dev. To Pharoites perceive vm-dev as a squeak thing? If so, may I suggest pharo-vm-dev? If not, can the Pharo community make an effort to direct vm discussion towards vm-dev in future? Sorry, my fault. I considered it originally a Pharo-only issue, because the simulator seems to work in Squeak. Best regards Stefan -- Stefan Marr INRIA Lille - Nord Europe http://stefan-marr.de/research/ |
In reply to this post by Ron Teitelbaum
(followups to vm-dev, please) Hi Phil-- > ...having a clean interpreter and a basic image (Maybe > PharoKernel/Hazelnut/Boostrapping/Spoon will give us a very simple > image to simulate - the whole image isn't really needed). Yeah, the simulator is crucial to the Spoon[1] work, and I've kept it working for its development memories at all times. None of those memories have GUIs in them, but I am simulating things that were never simulated before, like live network access (so remote messaging between a simulated memory and a normal one works). thanks, -C [1] http://netjam.org/spoon -- Craig Latta www.netjam.org/resume +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) |
In reply to this post by Stefan Marr-3
On Thu, Feb 13, 2014 at 11:56 AM, Stefan Marr <[hidden email]> wrote: --
Sure, knock yourself out. The simulator isn't pretty, but avoiding adding new warts is fine. Just don't obfuscate.
Will try to look into it tomorrow. thanks, lovely. i already addressed the getSystemParameter: issue.
But its a VM issue and we should discuss vm issues in the vm forum. Otherwise the community's vm development is in danger (IMO) of being as balkanised as the Pharo/Squeak split and that would break my heart and lower my motivation.
best, Eliot
|
Hi All,
I got pure Morphic MouseEvents forwarded just fine (thanks to your help on the bit-fiddling) and the translation is good enough to pop up a menu from the top menu bar. I had a screenshot, but it bounced the first iteration of this message, so you will have to take my word on that. (: Next up is KeyboardEvents and at first glance it looks a bit daunting. Here is why. This method in HandMorph invokes one of ~18 subclasses of KeyboardInputInterpreter
That nextCharFrom: firstEvt: send is where it gets interesting as it is keyboard specific. To see why, compare the implementation in to
So, assume I have to stuff some unknown character into a primitive event to feed to the simulator....I don't think "skooch and tack on" is going to work like it did for the mouseEvents. I will be examining this more closely in a day or two as I have to focus on some work for a client, but wanted to get it out there for your thoughts on the matter in the meantime. Thanks. tty. P.S. David, when you get time, Eliot mentioned getting with you so I could contribute my work. Let me know what I need to do at your convenience. |
On 14.02.2014, at 00:34, gettimothy <[hidden email]> wrote: > Hi All, > > I got pure Morphic MouseEvents forwarded just fine (thanks to your help on the bit-fiddling) and the translation is good enough to pop up a menu from the top menu bar. Nice! :) > Next up is KeyboardEvents and at first glance it looks a bit daunting. Key stroke events are pretty simple: you just put the ASCII code into one field and the Unicode into another. This is the same on pretty much any platform now. But for full emulation you also need to emulate key down and key up events. Those are platform-specific, each has their own raw key codes. Unfortunately we never took the time to make all platforms present key codes uniformly. (We could still do it: up/down events are almost completely unused, partly because of this problem). If you want to emulate up/down events, I think your best bet will be to emulate a Windows VM. Because on Windows, the keycodes are based on ASCII - the 'a' key has key code 65. This must be independent on whether shift is pressed or not, because it refers to the physical key. If you wanted to emulate Mac you'ld have to generate Mac key codes (A=0, S=1, D=2, F=3, etc). Unix/X11 might be easier too, I think it uses X11 keysyms, but IIRC the Unix VM does give different key codes for a and shift-a, which is wrong. - Bert - smime.p7s (5K) Download Attachment |
Bert.
Thanks. You mentioned that ".. we never took the time to make all platforms present key codes uniformly. (We could still do it: up/down events are almost completely unused, partly because of this problem)...." This sounds like fun. I will poke around and try to understand the sub-system and get back to the list. Cheers. tty. On 14.02.2014, at 00:34, gettimothy <[hidden email]> wrote: |
On 14 February 2014 11:57, gettimothy <[hidden email]> wrote: > > Bert. > > Thanks. > > You mentioned that ".. we never took the time to make all platforms present key codes uniformly. (We could still do it: up/down events are almost completely unused, partly because of this problem)...." > > This sounds like fun. I will poke around and try to understand the sub-system and get back to the list. > > Cheers. Could this be enough work for a GSoC project? (I say this knowing I might tread on your toes here, tty - not wanting to, nor wanting to take anything away from either your fun or your contributions: just wondering if we could someone to pay for this kind've work, and thus maximise VM work.) frank > tty. > > > > ---- On Fri, 14 Feb 2014 02:33:45 -0800 Bert Freudenberg<[hidden email]> wrote ---- > > On 14.02.2014, at 00:34, gettimothy <[hidden email]> wrote: > >> Hi All, >> >> I got pure Morphic MouseEvents forwarded just fine (thanks to your help on the bit-fiddling) and the translation is good enough to pop up a menu from the top menu bar. > > Nice! :) > >> Next up is KeyboardEvents and at first glance it looks a bit daunting. > > Key stroke events are pretty simple: you just put the ASCII code into one field and the Unicode into another. This is the same on pretty much any platform now. > > But for full emulation you also need to emulate key down and key up events. Those are platform-specific, each has their own raw key codes. Unfortunately we never took the time to make all platforms present key codes uniformly. (We could still do it: up/down events are almost completely unused, partly because of this problem). > > If you want to emulate up/down events, I think your best bet will be to emulate a Windows VM. Because on Windows, the keycodes are based on ASCII - the 'a' key has key code 65. This must be independent on whether shift is pressed or not, because it refers to the physical key. If you wanted to emulate Mac you'ld have to generate Mac key codes (A=0, S=1, D=2, F=3, etc). Unix/X11 might be easier too, I think it uses X11 keysyms, but IIRC the Unix VM does give different key codes for a and shift-a, which is wrong. > > - Bert - > > > |
In reply to this post by Eliot Miranda-2
Hi Eliot: On 13 Feb 2014, at 21:04, Eliot Miranda <[hidden email]> wrote: > thanks, lovely. i already addressed the getSystemParameter: issue. In the StackInterpreterSimulator, the various #run… methods do unconditionally the initialization of stack pages and initial context. This looks wrong to me, especially since the comment of #runForNBytes: says that I should be able to use it repeatedly. I would move the initialization to #initializeInterpreter: in StackInterpreterSimulator and remove it from all the run methods. See [1]. So, with all latest changes the code below gives you a StackInterpreterSimulator that executes the latest Pharo images. Until it runs into inconsistent values in the BalloonEngineSimulation. But for many cases this should already be more than sufficient. InterpreterStackPage initialize. StackInterpreterSimulator initializeWithOptions: Dictionary new. sim := StackInterpreterSimulator new. sim openOn: 'Pharo.image'. sim openAsMorph. sim initStackPages. sim loadInitialContext. 1 to: 500 do: [:i | sim runForNBytes: 100000. World doOneCycleNow ]. At the moment, there seem to be strange interactions going on between the simulator and the rest of the system. At least using `[sim run] fork` doesn’t work properly, and I suppose until the event handling is fixed #run will not work completely either. Please note, all changes I did is merely fixing bit rot, nothing really broken. I assume that the BalloonEngine issue would take a little more to debug, but I am not sure what it is in the first place. So interested parties could try it comment. Best regards Stefan [1] https://github.com/smarr/pharo-vm/commit/114f5b3db0ff2185ca5eac0d033eb95b99f524cb -- Stefan Marr INRIA Lille - Nord Europe http://stefan-marr.de/research/ |
In reply to this post by tty
Hi tty: I have been loosely following your work on getting the simulator working properly. Is the code available somewhere? Would like to have a look and try to adapt it if necessary for the simulator on top of Pharo3. Thanks Stefan -- Stefan Marr INRIA Lille - Nord Europe http://stefan-marr.de/research/ |
In reply to this post by Frank Shearar-3
I need some money! Does GSoC apply to free-lancers with dwindling client bases?
|
Free forum by Nabble | Edit this page |