Re: [Pharo-users] Woden - Rotate an Object from absolute referential
Hello Merwan, Currently is not possible because the only way to represent rotations is to use a matrix. I have to add support for quaternions, which gives me an opportunity to also add Euler angles. When I add support for Euler angles, you wil be able to do what you want easily. Currently, you have to use node orientation: (WDMatrix3 xrot: angle) to achieve what you are trying to do. Greetings, Ronie 2015-05-04 11:55 GMT-03:00 merwanoudd...@gmail.com: Hello everyone, I am currently making a little demo with woden and I would like to rotate a cube, not from the relative referential but from the absolute one ( rotate X always rotate in the same direction even if I previously have rotated Y ). What currently happens is that when I rotate the cube, the referential rotates as well... Does anyone know how to counter this ? Thanks Merwan
[Pharo-users] Woden - Rotate an Object from absolute referential
Hello everyone, I am currently making a little demo with woden and I would like to rotate a cube, not from the relative referential but from the absolute one ( rotate X always rotate in the same direction even if I previously have rotated Y ). What currently happens is that when I rotate the cube, the referential rotates as well... Does anyone know how to counter this ? Thanks Merwan
Re: [Pharo-users] MouseWheel events
Le 11/5/15 02:34, Sean P. DeNigris a écrit : Matthieu Lacaton wrote Let's say for example thant I want to create a rectangle on the screen and be able to move it up and down by pressing CTRL + up / down arrow and be able to rotate it with the mouse wheel. Does this mean that on Linux I just can't Mathieu contact Merwan to see if he has support for that. With OSWindow events (based on SDL ones) I was able to do so without trouble. I was just surprised by VM events but no big deal. 2015-05-11 21:32 GMT+02:00 stepharo steph...@free.fr: Sean We are working on SDL based events so we should probably synchronise. Because mouse wheel should be an event and not simulated. Merwan is producing touch event. Stef Le 11/5/15 02:34, Sean P. DeNigris a écrit : Matthieu Lacaton wrote Let's say for example thant I want to create a rectangle on the screen and be able to move it up and down by pressing CTRL + up / down arrow and be able to rotate it with the mouse wheel. Does this mean that on Linux I just can't ? Mathieu contact Merwan to see if he has support for that. That is correct by default, but you can always hack the VM if you rally want that behavior. Also, if you just wait a bit, I'm in the process of remapping the wheel simulation shortcuts to be extremely less likely to conflict with actual keyboard events. It is already done for Mac. I wrote the patch for GNU/Linux Windows, but didn't have machines available when I was testing (the code may take a bit of massaging to compile). The upside is that it's a backward compatible VM change, so you will be able to take advantage of it in any Pharo version that will run on the latest VMs. Matthieu Lacaton wrote And does this mean that if I create an application able to react to mouse wheel, I need to code it differently for Windows and for Linux ? No, you would code it the same way. In the image, MouseWheelEvents are created regardless of the keyboard event used to simulate them. The only thing different would be the keyboard equivalents.
[Pharo-users] beginner question - how to get a fully qualified filename from a dialog
I have a method: openSimulationFile inFile := (StandardFileStream fileNamed: '/Users/amaloney/Squeak/30shoes.txt') ascii I want to replace the hard coded fully qualified filename with the result of a file browser dialog. I've done some Googling and poked around in the system browser and I find that if I enter (in a playground) UIManager default chooseDirectory and inspect-it I get: a FileReference (/Users/amaloney/Squeak) and if I try UIManager default chooseFileMatching: #( '*.txt' ) I get: a ByteString ('Readme.txt'). It seems that UIManager chooseDirectory is the method I should start exploring (since it returns a FileReference object) but the method is: chooseDirectory Let the user choose a directory ^self chooseDirectoryFrom: FileSystem workingDirectory and when I look at chooseDirectoryFrom: I get chooseDirectoryFrom: dir Let the user choose a directory ^self chooseDirectory: nil from: dir so I look at chooseDirectory: from: and I get: chooseDirectory: label from: dir Let the user choose a directory ^self subclassResponsibility Which doesn't help so I dig around in the docs some more and find out that the green down arrow is clickable. When I click it and choose MorphicUlManager#chooseDirectory:from: the method definition is: chooseDirectory: label from: dir Answer the user choice of a directory. | modalMorph realLabel | realLabel := label ifNil: ['Choose Directory' translated]. (ProvideAnswerNotification signal: realLabel) ifNotNil: [:answer | ^answer ]. modalMorph := self modalMorph. ^modalMorph theme chooseDirectoryIn: modalMorph title: realLabel path: (dir ifNotNil: [dir fullName]) The problem is that I cannot find a chooseDirectoryIn:title:path: method. I wrote this all out hoping someone can tell me where I chose the wrong rabbit hole and can point me to instructions on how to choose the correct rabbit hole. ;-) (Also, if there is a short answer i.e. use this objectmethod, I'd appreciate that as well.) Thanks, Mike -- View this message in context: http://forum.world.st/beginner-question-how-to-get-a-fully-qualified-filename-from-a-dialog-tp4826037.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
[Pharo-users] Moving the HandMorph
In Pharo 4.0 load EventRecorder. It is a complete reimplementation of an old goodie together with tests. Then check Tools - EventRecorder in the world menu Bye T.
Re: [Pharo-users] beginner question - how to get a fully qualified filename from a dialog
Hi, maybe instead of UIManager you could look on UITheme. For example the following code: Smalltalk ui theme chooseFullFileNameIn: World title: 'Select file to open' extensions: nil path: (myActualFilePath isNil ifTrue: [ myActualFilePath ] ifFalse: [ FileSystem workingDirectory ]) preview: nil This will open a dialog with Select file to open in title, it will accept file of every extension and the path will begin at myActualFilePath or into the working directory if the actual file path is nil. On 12 May 2015 at 18:00, amaloney amalo...@earthlink.net wrote: I have a method: openSimulationFile inFile := (StandardFileStream fileNamed: '/Users/amaloney/Squeak/30shoes.txt') ascii I want to replace the hard coded fully qualified filename with the result of a file browser dialog. I've done some Googling and poked around in the system browser and I find that if I enter (in a playground) UIManager default chooseDirectory and inspect-it I get: a FileReference (/Users/amaloney/Squeak) and if I try UIManager default chooseFileMatching: #( '*.txt' ) I get: a ByteString ('Readme.txt'). It seems that UIManager chooseDirectory is the method I should start exploring (since it returns a FileReference object) but the method is: chooseDirectory Let the user choose a directory ^self chooseDirectoryFrom: FileSystem workingDirectory and when I look at chooseDirectoryFrom: I get chooseDirectoryFrom: dir Let the user choose a directory ^self chooseDirectory: nil from: dir so I look at chooseDirectory: from: and I get: chooseDirectory: label from: dir Let the user choose a directory ^self subclassResponsibility Which doesn't help so I dig around in the docs some more and find out that the green down arrow is clickable. When I click it and choose MorphicUlManager#chooseDirectory:from: the method definition is: chooseDirectory: label from: dir Answer the user choice of a directory. | modalMorph realLabel | realLabel := label ifNil: ['Choose Directory' translated]. (ProvideAnswerNotification signal: realLabel) ifNotNil: [:answer | ^answer ]. modalMorph := self modalMorph. ^modalMorph theme chooseDirectoryIn: modalMorph title: realLabel path: (dir ifNotNil: [dir fullName]) The problem is that I cannot find a chooseDirectoryIn:title:path: method. I wrote this all out hoping someone can tell me where I chose the wrong rabbit hole and can point me to instructions on how to choose the correct rabbit hole. ;-) (Also, if there is a short answer i.e. use this objectmethod, I'd appreciate that as well.) Thanks, Mike -- View this message in context: http://forum.world.st/beginner-question-how-to-get-a-fully-qualified-filename-from-a-dialog-tp4826037.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. -- Cheers Cyril Ferlicot
Re: [Pharo-users] Using VirtualGPU
Hi Serge, I made some experiments with GPU computing with JavaScript. I understood that the computings are made forever inside the GPU, so you just throw data and programs once and you let the GPU compute for you. Yet the problem is to read the data once they are computed. With webGL it seems impossible, with webCL it is possible and not easy. Hence the choice of openCL I guess. I relate here how I could compute the powers of a Markov matrix here: http://revue.sesamath.net/spip.php?article651 (especially click on webGL sans three.js). I also made some experiments here: http://irem.univ-reunion.fr/spip.php?article797 (but they use three.js if I remember well) Happy readings, and, yes, I feel interersted in these subjects Alain On Tue, May 12, 2015 at 7:48 PM, Serge Stinckwich serge.stinckw...@gmail.com wrote: Dear all, just to let you know, Cheikhou (in CC) is starting a student internship in my lab. He will work on Epidemiology Modelling with KENDRICK: http://ummisco.github.io/kendrick/ the platform that we are developing in order to analyse and visualise diseases models behaviours. We would like first to implement a GPU version of the Gillespie Stochastic Simulation Algorithm (GSSA): http://en.wikipedia.org/wiki/Gillespie_algorithm and after that also implement SPH simulations: https://en.wikipedia.org/wiki/Smoothed-particle_hydrodynamics We are looking at the code of OpenCL and VirtualGPU done by Ronnie. What we have understand until now : - OpenCL package : low-level stuff to be able to interface OpenCL kernels with Pharo - VirtualGPU: high-level API on top of OpenCL in order to ease the task of people who wants to use OpenCL. VirtualGPU provide high-level operations on matrix and image at the moment. @Ronie: What is not clear at the moment in our mind : when you build a VirtualGPU program with the DSL, do you have the overhead of communications every time you execute a VirtualGPU instruction or all the the instructions are sent at the same time and run on the GPU ? In our context, for building a GSSA algorithm, I guess we just have to combine same VGPU instructions (matrix computations) but for doing SPH simulations, we will have to provide our own instructions. Is there any documentation in order to add own kernel and instructions ? I know that others guys at INRIA (Stéphane ?) are interested by GPU. Is it possible to join our effort to share what we are doing ? Regards, -- Serge Stinckwich UCBN UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/
Re: [Pharo-users] mac address on windows
Hi Nicolas, Thank you for looking at the code. I was away and could not try your code. On Thu, May 7, 2015 at 9:27 AM, p...@highoctane.be p...@highoctane.be wrote: On Thu, May 7, 2015 at 1:06 AM, Nicolai Hess nicolaih...@web.de wrote: 2015-05-06 22:47 GMT+02:00 Henrik Sperre Johansen henrik.s.johan...@veloxit.no: A few easily fixed Type/pointers to Types mixups, and a slipup where two different classes are confused for the same aside, the real show stopper, if I haven't missed something entirely, is that the struct parser/NB in general does not handle const sized arrays*, which is used in a few of the required structs. Extending the parser should be relatively straight forward, along the lines of adding stream peek: #'[' ifTrue: [stream next. type := SizedExternalArrayType type: type size: stream next. stream next = #']' ifFalse: [self error: 'Missing closing bracket for ', type printString]] to NBExtenralStructureFields #parseFields:... after the name is read. Coding SizedExternalArrayType is a bit more work though... Cheers, Henry *The end goal would be to be able to generate accessors/read/write for a simple test-struct such as #fieldsDesc ^#( char ip[MyClassVar +2]; ) Yes, a parser for this would be great. I tried it with a little hack NBExternalStructure subclass: #Char_260 ... Char_260 class#fieldDesc ^ #(char data) Char_260 classinstanceSize ^ 260 You need another accessor for accessing the data, otherwise you'll only get the first char. AND I don't know how the external memory is handle, probably it is never freed :) Now a complete example (attached code) call it with GetMacWin32 getMacAddress Code loads fine on my 3.0 same here. But hiccup on: resolveType: aTypeName a type name could be - a class variable name - a class name - a type name - a type name, followed by arbitrary number pointer chars - $* | name newName resolver binding ptrArity | newName := aTypeName. ptrArity := 0. resolve aliases and pointers [ name := newName trimRight. --- HERE - as newName is a subclass of NBExternalStructure, so no trimRight newName := self aliasForType: name. newName last = $* ifTrue: [ ptrArity := ptrArity + 1. newName := newName allButLast ]. name = newName ] whileFalse. I changed to name := newName asString trimRight. this worked for me. Call worked then but output gives this: GetMacWin32 getMacAddress 'BYTE_8 ( data: $¼ -- some weird string here )' It worked for me, I didn't encounter the problem of strange characters. I get: 000c29ab7096 The last 4 trailing zeros are not the part of the mac address and I am not sure why these are getting added. I'll have a look at your code. thanks again. usman Also, I wonder why you call the primGet... twice getMacAddressOf: iInterface | ptr ptr2 nul ret | ptr := NativeBoost allocate: 4. nul := NativeBoost allocate: 0. ptr nbUInt32AtOffset: 0 put: 0. ret := self primGetAdaptersInfo: nul length: ptr. ret = 111 ERROR_BUFFER_OVERFLOW ifTrue: [ | size | size := ptr nbUInt32AtOffset: 0. ptr2 := NativeBoost allocate: size. ret := self primGetAdaptersInfo: ptr2 length: ptr. ret = 0 NO_ERROR ifTrue: [ | pip numberOfInterfaces| numberOfInterfaces := size / IpAdapterInfo instanceSize. (iInterface between:1 and: numberOfInterfaces) ifFalse:[ ^ nil]. pip := (NBExternalArray ofType: IpAdapterInfo) onAddress: ptr2 size: numberOfInterfaces. ^ (pip at:iInterface ) Address asString]]. ^ nil Phil On Wed, May 6, 2015 at 5:28 PM, Esteban Lorenzano esteba...@gmail.com wrote: On 06 May 2015, at 17:03, Nicolai Hess nicolaih...@web.de wrote: 2015-05-06 16:40 GMT+02:00 Esteban Lorenzano esteba...@gmail.com: On 06 May 2015, at 12:10, p...@highoctane.be wrote: I've loaded your package. A prerequisite is to load OS-Window to make it work. why? in any case, oswindow is already included in pharo4 OS-Windows (by TorstenBergmann) not OSWindow :) ahhh. Name clash :) It is needed for the shared pool WinTypes, but without OS-Window, he can use NBWinTypes instead. Esteban I've got the DLL call working nicely and the nativeboost with the structure freezing. Now, we should all have a look at: https://github.com/ronsaldo/bullet-pharo and https://github.com/ronsaldo/swig because it looks like the way to go to wrap libraries... Ronie, I know you modified swig for generating Pharo code; Is cloning your swig repo the way to go ? Phil On Wed, May 6, 2015 at 10:39 AM, Usman Bhatti usman.bha...@gmail.com wrote: Hi Nicolai, Here is my package that defines the nativeboost call and associated C structs. The external C struct is self referencing and hence sometimes I get infinite recursion when trying to change field descriptions. That is the reason why the automatically generated accessors are absent (although I had them in an earlier version). Attached also
[Pharo-users] Garage and SQLite file databases, general project structure
Hi Guille, I had a short look at Garage [1]. Nice initiative! Looks like using a file is not supported for the SQLite3 backend in Garage: GADriver fromConnectionString: 'sqlite3://file://C:/temp/test.db' GADriver fromConnectionString: 'sqlite3://C:/temp/test.db' Maybe GASqlite3DriverfromConnectionString: could be adopted, but the conversion to a Zn URL already removes some stuff. (Ab)using the schema in the URL as a driverID is nice - but prevents the use of file:// schema. How can one construct a file db? Also I do not understand: while Garage-Postgres uses the Postgres project PostgresV2 as a backend the Garage-Sqlite3 does not use NBSqlite3 or SQlite3 projects as backend. So GASqlite3FFI copies many methods of the original NBSQLite3 project from Pierce and myself and is therefore like an own fork now. Also the name FFI is misleading as it uses NativeBoost instead of FFI ... Also it would be good if the project would be layered, we could have a Garage-Core and Garage-Tests-Core with Garage-Mysql and Garage-Tests-Mysql for the fixtures. The idea is always to be able to load runtime code without tests for production code. Thanks Torsten [1] http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2015-May/019192.html
Re: [Pharo-users] beginner question - how to get a fully qualified filename from a dialog
Thank you for that Cyril; it's just what I need. Cheers! -- View this message in context: http://forum.world.st/beginner-question-how-to-get-a-fully-qualified-filename-from-a-dialog-tp4826037p4826093.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] mac address on windows
I had a #asString method in the BYTE_8 class that I put by accident in the *generated-code... protocol This method will be removed if the generated methods are regenerated. Just add a new method: BYTE_8asString ^ self address hex The address has 8 bytes because this is the max number of bytes reserved for the address. The IP_ADAPTER_INFO struct has a field for the actually used number of bytes. You can read that field and just read this number of bytes. 2015-05-12 21:32 GMT+02:00 Usman Bhatti usman.bha...@gmail.com: Hi Nicolas, Thank you for looking at the code. I was away and could not try your code. On Thu, May 7, 2015 at 9:27 AM, p...@highoctane.be p...@highoctane.be wrote: On Thu, May 7, 2015 at 1:06 AM, Nicolai Hess nicolaih...@web.de wrote: 2015-05-06 22:47 GMT+02:00 Henrik Sperre Johansen henrik.s.johan...@veloxit.no: A few easily fixed Type/pointers to Types mixups, and a slipup where two different classes are confused for the same aside, the real show stopper, if I haven't missed something entirely, is that the struct parser/NB in general does not handle const sized arrays*, which is used in a few of the required structs. Extending the parser should be relatively straight forward, along the lines of adding stream peek: #'[' ifTrue: [stream next. type := SizedExternalArrayType type: type size: stream next. stream next = #']' ifFalse: [self error: 'Missing closing bracket for ', type printString]] to NBExtenralStructureFields #parseFields:... after the name is read. Coding SizedExternalArrayType is a bit more work though... Cheers, Henry *The end goal would be to be able to generate accessors/read/write for a simple test-struct such as #fieldsDesc ^#( char ip[MyClassVar +2]; ) Yes, a parser for this would be great. I tried it with a little hack NBExternalStructure subclass: #Char_260 ... Char_260 class#fieldDesc ^ #(char data) Char_260 classinstanceSize ^ 260 You need another accessor for accessing the data, otherwise you'll only get the first char. AND I don't know how the external memory is handle, probably it is never freed :) Now a complete example (attached code) call it with GetMacWin32 getMacAddress Code loads fine on my 3.0 same here. But hiccup on: resolveType: aTypeName a type name could be - a class variable name - a class name - a type name - a type name, followed by arbitrary number pointer chars - $* | name newName resolver binding ptrArity | newName := aTypeName. ptrArity := 0. resolve aliases and pointers [ name := newName trimRight. --- HERE - as newName is a subclass of NBExternalStructure, so no trimRight newName := self aliasForType: name. newName last = $* ifTrue: [ ptrArity := ptrArity + 1. newName := newName allButLast ]. name = newName ] whileFalse. I changed to name := newName asString trimRight. this worked for me. Call worked then but output gives this: GetMacWin32 getMacAddress 'BYTE_8 ( data: $¼ -- some weird string here )' It worked for me, I didn't encounter the problem of strange characters. I get: 000c29ab7096 The last 4 trailing zeros are not the part of the mac address and I am not sure why these are getting added. I'll have a look at your code. thanks again. usman Also, I wonder why you call the primGet... twice getMacAddressOf: iInterface | ptr ptr2 nul ret | ptr := NativeBoost allocate: 4. nul := NativeBoost allocate: 0. ptr nbUInt32AtOffset: 0 put: 0. ret := self primGetAdaptersInfo: nul length: ptr. ret = 111 ERROR_BUFFER_OVERFLOW ifTrue: [ | size | size := ptr nbUInt32AtOffset: 0. ptr2 := NativeBoost allocate: size. ret := self primGetAdaptersInfo: ptr2 length: ptr. ret = 0 NO_ERROR ifTrue: [ | pip numberOfInterfaces| numberOfInterfaces := size / IpAdapterInfo instanceSize. (iInterface between:1 and: numberOfInterfaces) ifFalse:[ ^ nil]. pip := (NBExternalArray ofType: IpAdapterInfo) onAddress: ptr2 size: numberOfInterfaces. ^ (pip at:iInterface ) Address asString]]. ^ nil Phil On Wed, May 6, 2015 at 5:28 PM, Esteban Lorenzano esteba...@gmail.com wrote: On 06 May 2015, at 17:03, Nicolai Hess nicolaih...@web.de wrote: 2015-05-06 16:40 GMT+02:00 Esteban Lorenzano esteba...@gmail.com: On 06 May 2015, at 12:10, p...@highoctane.be wrote: I've loaded your package. A prerequisite is to load OS-Window to make it work. why? in any case, oswindow is already included in pharo4 OS-Windows (by TorstenBergmann) not OSWindow :) ahhh. Name clash :) It is needed for the shared pool WinTypes, but without OS-Window, he can use NBWinTypes instead. Esteban I've got the DLL call working nicely and the nativeboost with the structure freezing. Now, we should all have a look at: https://github.com/ronsaldo/bullet-pharo and https://github.com/ronsaldo/swig because it looks like the way to go to wrap libraries... Ronie, I
Re: [Pharo-users] protobufs for Pharo
I'm pretty sure there isn't a protobuf library for Pharo. If you're planning on implementing one, I'd love to collaborate (I could certainly use one for Phriak (driver for the Riak nosql db)). On Mon, May 11, 2015 at 2:46 PM, Benjamin Pollack benja...@bitquabit.com wrote: On Mon, May 11, 2015, at 12:27 PM, Paul DeBruicker wrote: If you've gotta have prorobuf then you've gotta have protobuf but there is a thrift implementation (https://thrift.apache.org/) and also a message pack implementation (https://code.google.com/p/stomp-serializer/) There are unfortunately a lot of protocols (including the one I mentioned used by RethinkDb) that are protobuf-based, so using one of those won't work too well. If interfacing with a third-party tool *weren't* necessary, I'd honestly probably just use Fuel, anyway. --Benjamin
Re: [Pharo-users] MouseWheel events
Matthieu Lacaton wrote I was just surprised by VM events... That's understandable. We inherited quite a mess with events, but we've been slowly cleaning and SDL seems exciting! - Cheers, Sean -- View this message in context: http://forum.world.st/MouseWheel-events-tp4824839p4825959.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Woden - Rotate an Object from absolute referential
Thanks for your answer ronnie, I did not manage to do it with node orientation, can you please be more specific ? De : Ronie Salgado Envoyé : mardi 12 mai 2015 09:44 À : Any question about pharo is welcome Hello Merwan, Currently is not possible because the only way to represent rotations is to use a matrix. I have to add support for quaternions, which gives me an opportunity to also add Euler angles. When I add support for Euler angles, you wil be able to do what you want easily. Currently, you have to use node orientation: (WDMatrix3 xrot: angle) to achieve what you are trying to do. Greetings, Ronie 2015-05-04 11:55 GMT-03:00 merwanoudd...@gmail.com: Hello everyone, I am currently making a little demo with woden and I would like to rotate a cube, not from the relative referential but from the absolute one ( rotate X always rotate in the same direction even if I previously have rotated Y ). What currently happens is that when I rotate the cube, the referential rotates as well... Does anyone know how to counter this ? Thanks Merwan
Re: [Pharo-users] MouseWheel events
stepharo wrote We are working on SDL based events so we should probably synchronise. Because mouse wheel should be an event and not simulated. Absolutely! I was just improving the existing hack (mainly because I want horizontal wheel events) until you guys finish something really good :) - Cheers, Sean -- View this message in context: http://forum.world.st/MouseWheel-events-tp4824839p4825958.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Creating a Class in a Temporary Environment
Hi Sean, You can use AnonymousClassInstaller instead of PharoClassInstaller. We should improve it because it has limitations: the environment is not used and you won’t be able to change the slots or the superclass after creation. AnonymousClassInstaller make: [ :builder | builder superclass: Object; name: #AClassForTesting ]. Camille On 12 May 2015, at 12:45, Sean P. DeNigris s...@clipperadams.com wrote: I used to have creatingAClassInATemporaryNamespace | testingEnvironment morph | testingEnvironment := SystemDictionary new. ClassBuilder new name: #AClassForTesting inEnvironment: testingEnvironment subclassOf: Object type: Object typeOfClass instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'TemporaryTesting'. How do I do this with Slots? I tried: creatingAClassInATemporaryNamespace | testingEnvironment morph | testingEnvironment := SystemDictionary new. PharoClassInstaller make: [ :builder | builder superclass: Object; name: #AClassForTesting; environment: testingEnvironment; category: 'TemporaryTesting' ]. but got key #SystemOrganization not found in SystemDictionary”. - Cheers, Sean -- View this message in context: http://forum.world.st/Creating-a-Class-in-a-Temporary-Environment-tp4825963.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
[Pharo-users] Enhancing ICal library
Hi everyone, I took a little time to enhance the ICal library and to make it work with Pharo 4! So I forked the one on smalltalkhub (http://smalltalkhub.com/#!/~pdebruic/iCal) and put all the modified code on github https://github.com/juliendelplanque/pharo-ical. Why did I forked? Well, I wanted to make it work on pharo 4 first, so I contacted the owner of the smalltalkhub repository. He wanted to keep it working on other smalltalk than Pharo. The problem was that the lib used Url class that were deprecated in Pharo 3 and even removed on Pharo 4! So I managed to repair the package using ZnUrl. Since I don't know if the owner of this lib on Smalltalkhub have time to manage the problem to keep the lib multi-smalltalk, I have chosen to fork it so he can keep his version compatible. Good news are that I plan to keep it alive as long as I can, write some documentation for it when I have time and even try to enhance it. I already added a GTInspector extension to have better representation of iCalendar when inspecting them in Pharo. The version on master branch is supported by Pharo 2-3-4 (didn't check with Pharo 1). Regards, Julien
Re: [Pharo-users] Creating a Class in a Temporary Environment
Sean, Maybe it is not exactly what you asked but when it is about creating classes/traits for testing I always used ClassFactoryForTestCase (see it is used by Fuel). You can even check how that class currently creates the stuff. Cheers, On Tue, May 12, 2015 at 7:45 AM, Sean P. DeNigris s...@clipperadams.com wrote: I used to have creatingAClassInATemporaryNamespace | testingEnvironment morph | testingEnvironment := SystemDictionary new. ClassBuilder new name: #AClassForTesting inEnvironment: testingEnvironment subclassOf: Object type: Object typeOfClass instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'TemporaryTesting'. How do I do this with Slots? I tried: creatingAClassInATemporaryNamespace | testingEnvironment morph | testingEnvironment := SystemDictionary new. PharoClassInstaller make: [ :builder | builder superclass: Object; name: #AClassForTesting; environment: testingEnvironment; category: 'TemporaryTesting' ]. but got key #SystemOrganization not found in SystemDictionary. - Cheers, Sean -- View this message in context: http://forum.world.st/Creating-a-Class-in-a-Temporary-Environment-tp4825963.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. -- Mariano http://marianopeck.wordpress.com
[Pharo-users] Creating a Class in a Temporary Environment
I used to have creatingAClassInATemporaryNamespace | testingEnvironment morph | testingEnvironment := SystemDictionary new. ClassBuilder new name: #AClassForTesting inEnvironment: testingEnvironment subclassOf: Object type: Object typeOfClass instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'TemporaryTesting'. How do I do this with Slots? I tried: creatingAClassInATemporaryNamespace | testingEnvironment morph | testingEnvironment := SystemDictionary new. PharoClassInstaller make: [ :builder | builder superclass: Object; name: #AClassForTesting; environment: testingEnvironment; category: 'TemporaryTesting' ]. but got key #SystemOrganization not found in SystemDictionary. - Cheers, Sean -- View this message in context: http://forum.world.st/Creating-a-Class-in-a-Temporary-Environment-tp4825963.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Re: [Pharo-users] Image growing size
I am using TWM and yes it gobbles memory. Disable/GC/Enable is indeed aomething do every once in a while. No need for snapshots for this to occur. A couple of Nautilus windows do the same. Youcan close them all in TWM and still have them eat memory. Phil Le 13 mai 2015 01:50, Cameron Sanders via Pharo-users pharo-users@lists.pharo.org a écrit : -- Forwarded message -- From: Cameron Sanders camsand...@aol.com To: Any question about pharo is welcome pharo-users@lists.pharo.org Cc: Date: Tue, 3 Feb 2015 23:11:12 -0500 Subject: Re: [Pharo-users] Image growing size Do any of your (class/pool variable) singleton instances store data? add a #clearAll or #reset (mySingletonVar := nil) to the class side -- or whatever fits your app -- and do that before that #garbageCollect block. [In fact, put that in some XXXAdmin class] Good Luck, Cam On Tue, Feb 3, 2015 at 12:31 PM, p...@highoctane.be p...@highoctane.be wrote: Try to open monticello and select any repo, right click and clear the package cache. If you are using monticello that is. Also close all windows, open a workspace and do the 10 timesRepeat: [ Smalltalk garbageCollect]. HTH Phil Le 3 févr. 2015 17:49, Laura Risani laura.ris...@gmail.com a écrit : Hi all, The official image i've downloaded weighted about 40 MB. Now its size is about 200 MB. What is the explanation? Is this normal or have i done something wrong? I haven't been using globals, just downloaded and defined some packages. The only over persistent thing i've done is to keep an instance variable in some classes i wanted to have a unique instance. Best, Laura
[Pharo-users] Moving the HandMorph
Hello everybody, Is there a way to move the position of the cursor (the HandMorph) by passing commands to it ? I tried things like ActiveHand position: or ActiveHand moveToEvent: but nothing worked for me. Thanks, Matthieu
[Pharo-users] Using VirtualGPU
Dear all, just to let you know, Cheikhou (in CC) is starting a student internship in my lab. He will work on Epidemiology Modelling with KENDRICK: http://ummisco.github.io/kendrick/ the platform that we are developing in order to analyse and visualise diseases models behaviours. We would like first to implement a GPU version of the Gillespie Stochastic Simulation Algorithm (GSSA): http://en.wikipedia.org/wiki/Gillespie_algorithm and after that also implement SPH simulations: https://en.wikipedia.org/wiki/Smoothed-particle_hydrodynamics We are looking at the code of OpenCL and VirtualGPU done by Ronnie. What we have understand until now : - OpenCL package : low-level stuff to be able to interface OpenCL kernels with Pharo - VirtualGPU: high-level API on top of OpenCL in order to ease the task of people who wants to use OpenCL. VirtualGPU provide high-level operations on matrix and image at the moment. @Ronie: What is not clear at the moment in our mind : when you build a VirtualGPU program with the DSL, do you have the overhead of communications every time you execute a VirtualGPU instruction or all the the instructions are sent at the same time and run on the GPU ? In our context, for building a GSSA algorithm, I guess we just have to combine same VGPU instructions (matrix computations) but for doing SPH simulations, we will have to provide our own instructions. Is there any documentation in order to add own kernel and instructions ? I know that others guys at INRIA (Stéphane ?) are interested by GPU. Is it possible to join our effort to share what we are doing ? Regards, -- Serge Stinckwich UCBN UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/
Re: [Pharo-users] Moving the HandMorph
2015-05-12 17:40 GMT+02:00 Matthieu Lacaton matthieu.laca...@gmail.com: Hello everybody, Is there a way to move the position of the cursor (the HandMorph) by passing commands to it ? Not that I know of. There was a primitive for setting the cursorposition, but that was removed: http://bugs.squeak.org/view.php?id=7756 https://pharo.fogbugz.com/default.asp?10026 http://forum.world.st/Changing-mouse-position-from-Pharo-td4676580.html I tried things like ActiveHand position: or ActiveHand moveToEvent: but nothing worked for me. Thanks, Matthieu
Re: [Pharo-users] Moving the HandMorph
A bit extreme, but you could open World Tools Process Browser and notice Input Event Fetcher then put a self haltOnce in InputEventFetchersignalEvent: and trace through. Or maybe have a look at HandMorphForReplay in http://forum.world.st/ANN-EventRecorderMorph-Port-to-3-0-td4736258.html (disclaimer, I haven't got around to having a look at this myself yet) cheers -ben On Tue, May 12, 2015 at 11:40 PM, Matthieu Lacaton matthieu.laca...@gmail.com wrote: Hello everybody, Is there a way to move the position of the cursor (the HandMorph) by passing commands to it ? I tried things like ActiveHand position: or ActiveHand moveToEvent: but nothing worked for me. Thanks, Matthieu
Re: [Pharo-users] Moving the HandMorph
Okay. That was 2 years ago so I was wondering if something had changed since then but apparently not. Thanks a lot, Matthieu 2015-05-12 17:51 GMT+02:00 Nicolai Hess nicolaih...@web.de: 2015-05-12 17:40 GMT+02:00 Matthieu Lacaton matthieu.laca...@gmail.com: Hello everybody, Is there a way to move the position of the cursor (the HandMorph) by passing commands to it ? Not that I know of. There was a primitive for setting the cursorposition, but that was removed: http://bugs.squeak.org/view.php?id=7756 https://pharo.fogbugz.com/default.asp?10026 http://forum.world.st/Changing-mouse-position-from-Pharo-td4676580.html I tried things like ActiveHand position: or ActiveHand moveToEvent: but nothing worked for me. Thanks, Matthieu
Re: [Pharo-users] Moving the HandMorph
Or maybe have a look at HandMorphForReplay in http://forum.world.st/ANN-EventRecorderMorph-Port-to-3-0-td4736258.html Oh I didn't know about that, I'll definitely have a look at it, it seems cool ! Thanks, Matthieu 2015-05-12 17:57 GMT+02:00 Matthieu Lacaton matthieu.laca...@gmail.com: Okay. That was 2 years ago so I was wondering if something had changed since then but apparently not. Thanks a lot, Matthieu 2015-05-12 17:51 GMT+02:00 Nicolai Hess nicolaih...@web.de: 2015-05-12 17:40 GMT+02:00 Matthieu Lacaton matthieu.laca...@gmail.com: Hello everybody, Is there a way to move the position of the cursor (the HandMorph) by passing commands to it ? Not that I know of. There was a primitive for setting the cursorposition, but that was removed: http://bugs.squeak.org/view.php?id=7756 https://pharo.fogbugz.com/default.asp?10026 http://forum.world.st/Changing-mouse-position-from-Pharo-td4676580.html I tried things like ActiveHand position: or ActiveHand moveToEvent: but nothing worked for me. Thanks, Matthieu