[Pharo-project] Coral using NewCompiler

Luc Fabresse luc.fabresse at gmail.com
Thu Sep 3 11:54:04 EDT 2009


2009/9/3 Stéphane Ducasse <stephane.ducasse at inria.fr>

> 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?
>
Ok done.
Just load LoadCoral to test.

#Luc


> 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
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20090903/b5a61031/attachment-0001.html>


More information about the Pharo-dev mailing list