[Pharo-project] Coral using NewCompiler

Stéphane Ducasse stephane.ducasse at inria.fr
Thu Sep 3 04:15:52 EDT 2009


Excellent! Excellent! Excellent!
I want to
	- fix the problem about the path of the script so that you do not  
have to put the full path
	- have a better way to define classes
		Object > Point (may be like ruby)

	- use use use it

We should fix the to do
	- !#/usr/bin

I granted you access. I want coral to work.
Can you publish?

Stef

On Sep 3, 2009, at 9:59 AM, Luc Fabresse wrote:

> I modified LoadCoral and Coral so that it works in the  
> pharo1.0-10418-BETAdev09.08.3 image and uses NewCompiler.
> Since I cannot commit on the Coral repository, I attached the files.
>
> To test it :
> 1- file in LoadCoral that installs dependencies and the Coral  
> version on ss
> 2- file in Coral and Coral-DeadCode
> 3- save image as coral.image
> 4- create coral.sh script :
>
> #! /bin/sh
> vm='/Applications/SqueakVMs/Squeak 4.1.1beta2U.app/Contents/MacOS/ 
> Squeak VM Opt'
> "$vm" "coral.image" $1
>
> 5- create hello.st
> [
>         Console print: 'Hello World'
> ]
>
> 6- execute : ./coral.sh hello.st
>
> -------
>
> Below another script using Rio (File-Kernel, File-Base).
> 1- Installer ss project: 'Rio' ; install: 'File-Kernel'; install:  
> 'File-Base'
> syntax error on loading (just comment the pragma and accept)
> 2-create rio-test.st
>
> [
> 	Object subclass: #SaBox
> 		instanceVariableNames: 'bob'
> 		classVariableNames: ''
> 		poolDictionaries: ''
> 		category: 'SandBox'
> ]
>
> "a dummy example that convert a class in a file hierarchy"
> SaBox>>convertToFiles: aClass inDirectory: rootDir
> [
> 	| classDir categoryNames |
> 	classDir := (rootDir / aClass asString) mkdir.
> 	categoryNames := aClass organization categories collect:  
> [ :aCategory | aCategory asString ].
> 	categoryNames do: [ :aCategoryName | | protocolDir |
> 		protocolDir := (classDir / aCategoryName) mkdir.
> 		(aClass methodsInCategory: aCategoryName) do: [ :aSelector |
> 			(protocolDir / (aSelector asFileName replaceAll: $: with: $_))  
> asFile contents: (aClass sourceCodeAt: aSelector)
> 		]
> 	].
> 	^classDir
> ]
>
>
> [
> 	SaBox new convertToFiles: Object inDirectory: Directory home.
> ]
> 3- ./coral.st rio-test.sh
>
>
>
> #Luc
> <Coral.st><Coral- 
> DeadCode 
> .st><LoadCoral.st>_______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project





More information about the Pharo-dev mailing list