Hi,
I tried to embed an image into an executable (with the VM) under winXP, but I encountred two problems: -The first (simple) one is that it rejects the original VM with '.exe' extent. So, I had to rename it... -The most important problem is that I could not run the resulting executable.
Any hint?
Thanks
Hi,
I retried embedding with MacOs X and again failed. Strangely, I got the follwing error : Failed to write image file (disk full?). It looks like snapshotEmbeddedPrimitive fails although I used a vm.app file which is read/write.
Now I'm wondering whether this feature is really usefull. It seems that nobody cares about it and it may cause some trouble when trying to save after embedding. May be we should remove it.
Noury
Noury Bouraqadi wrote:
Hi,
I tried to embed an image into an executable (with the VM) under winXP, but I encountred two problems: -The first (simple) one is that it rejects the original VM with '.exe' extent. So, I had to rename it... -The most important problem is that I could not run the resulting executable.
Any hint?
Thanks
This is an os-9 feature, not supported under os-x, you need to run the VM under os-9 to use this primitive. But under os-x you can place your squeak.image file in the Resources folder, then the VM will use CFBundleCopyResourceURL to find it.
Thus you must do it in two steps, run the classic os-9 VM by finding the classic os-9 application in the MacOSClassic folder, and run it to make an embedded snapshot. Then drop the image in the resources folder so the os-x version can find it.
On Dec 7, 2004, at 6:56 AM, Noury Bouraqadi wrote:
Hi,
I retried embedding with MacOs X and again failed. Strangely, I got the follwing error : Failed to write image file (disk full?). It looks like snapshotEmbeddedPrimitive fails although I used a vm.app file which is read/write.
Now I'm wondering whether this feature is really usefull. It seems that nobody cares about it and it may cause some trouble when trying to save after embedding. May be we should remove it.
Noury
Noury Bouraqadi wrote:
Hi,
I tried to embed an image into an executable (with the VM) under winXP, but I encountred two problems: -The first (simple) one is that it rejects the original VM with '.exe' extent. So, I had to rename it... -The most important problem is that I could not run the resulting executable.
Any hint?
Thanks
--
Dr. Noury Bouraqadi - Enseignant/Chercheur Ecole des Mines de Douai - Dept. G.I.P http://csl.ensm-douai.fr/noury
European Smalltalk Users Group Board http://www.esug.org Squeak: an Open Source Smalltalk http://www.squeak.org ------------------------------------------
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Hi all.
I tried to calculate something. For Example,
1 to: 30 do: [ :j| 1 to: 30 do: [:k| 1 to: 30 do: [ :l| 1 to: 30 do: [:m| Something :-) ] ] ] ]
Like above.
It takes 50 seconds to finish this loop. Compare to C ( 0.1 second?), I think it is too slow.
Can I speed up?
Thanks in advance.
It takes 73 milliseconds for me on a 2.4GHz P4. What is your 'something'? I incremented a count variable.
Joshua
이춘석 wrote:
Hi all.
I tried to calculate something. For Example,
1 to: 30 do: [ :j| 1 to: 30 do: [:k| 1 to: 30 do: [ :l| 1 to: 30 do: [:m| Something :-) ] ] ] ]
Like above.
It takes 50 seconds to finish this loop. Compare to C ( 0.1 second?), I think it is too slow.
Can I speed up?
Thanks in advance.
Hello,
1 to: 30 do: [ :j| 1 to: 30 do: [:k| 1 to: 30 do: [ :l| 1 to: 30 do: [:m| Something :-) ] ] ] ]
The number of times that "Something :-)" gets executed is 810,000, or less than 1 mega times. Unless "Something :-)" is something, it shouldn't take anything like that.
It takes 50 seconds to finish this loop. Compare to C ( 0.1 second?), I think it is too slow.
The factor of 500? is too high, usually. Even a computation with bare Float objects performs better. If you can put your data in FloatArray, it'll perform much faster.
-- Yoshiki
Howdy Folks.
We're developing a croquet app which does various things, among them is include views and references to files which are better viewed outside of croquet/squeak than in.
I'd like to have a cross-platform method for running the OS's default viewer on files.
For example, the Win32Shell method shellOpen: does this nicely. You pass it "c:\hello.txt" and it opens the file in notepad or whatever app the user has associated with .txt.
Even better, you pass it "http://croquetproject.org", and it launches the user's preferred browser etc.
Is there a class which can do the same thing, especially launching a URL, on mac & *nix as well ?
thanks, Orion
Am 08.12.2004 um 19:18 schrieb oxe:
Howdy Folks.
We're developing a croquet app which does various things, among them is include views and references to files which are better viewed outside of croquet/squeak than in.
I'd like to have a cross-platform method for running the OS's default viewer on files.
For example, the Win32Shell method shellOpen: does this nicely. You pass it "c:\hello.txt" and it opens the file in notepad or whatever app the user has associated with .txt.
Even better, you pass it "http://croquetproject.org", and it launches the user's preferred browser etc.
Is there a class which can do the same thing, especially launching a URL, on mac & *nix as well ?
On Mac OS X you have the "open" command. Use FFI to implement the system() C lib function, then call system('open /path/to/my/file.txt'). You have to give a POSIX path. Works for URLs, too. See "man open".
- Bert -
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Bert Freudenberg schrieb:
| On Mac OS X you have the "open" command. Use FFI to implement the | system() C lib function, then call system('open | /path/to/my/file.txt'). You have to give a POSIX path. Works for | URLs, too. See "man open".
Interesting. So I could use this for ExternalWebBrowser to launch the browser on Mac OS X without the need to have the AppleScript package loaded. How do I distinguish wether the vm is running on Mac OS 9 or OS X by looking at platformname and platformSubtype?
Alex
If you ask for the system version information you'll find os-x is 1000 or higher....
On Dec 8, 2004, at 1:51 PM, Alexander Lazarević wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bert Freudenberg schrieb:
| On Mac OS X you have the "open" command. Use FFI to implement the | system() C lib function, then call system('open | /path/to/my/file.txt'). You have to give a POSIX path. Works for | URLs, too. See "man open".
Interesting. So I could use this for ExternalWebBrowser to launch the browser on Mac OS X without the need to have the AppleScript package loaded. How do I distinguish wether the vm is running on Mac OS 9 or OS X by looking at platformname and platformSubtype?
Alex -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBt3dvYiF2wSTEZ9gRAuNdAKC9Y0UiP5iNEzVH7l7N29psA+E2wwCfW912 cEUvtjibYKbhp0pF1Wuke2o= =Drk3 -----END PGP SIGNATURE-----
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Given that
[ 1 to: 30 do:[:j| 1 to: 30 do:[:k| 1 to: 30 do:[:l| 1 to: 30 do:[:m| "nothing" ]]]] ] timeToRun
Takes about 50ms it's clearly not the loop which slows your computation down but that unspecified "something". So it asking the question of how to speed up the loop is pointless as it only contributes .1% to the entire computation. You would be better advised to repost your question and include what it actually is you are trying to compute.
Cheers, - Andreas
----- Original Message ----- From: "이춘석" stonecold@jupiter.kaist.ac.kr To: "'The general-purpose Squeak developers list'" squeak-dev@lists.squeakfoundation.org Sent: Tuesday, December 07, 2004 8:05 AM Subject: [q]squeak is too slow?
Hi all.
I tried to calculate something. For Example,
1 to: 30 do: [ :j| 1 to: 30 do: [:k| 1 to: 30 do: [ :l| 1 to: 30 do: [:m| Something :-) ] ] ] ]
Like above.
It takes 50 seconds to finish this loop. Compare to C ( 0.1 second?), I think it is too slow.
Can I speed up?
Thanks in advance.
squeak-dev@lists.squeakfoundation.org