Pavel's CCodeGenerator works under Windows MinGW: sweet
I loaded the code from http://www.smalltalkhub.com/#!/~PavelKrivanek/CCodeGenerator where the generator is now standalone, from VMMaker I made my own little version here: http://www.smalltalkhub.com/#!/~philippeback/HOExtras/packages/CCodeGenerato r-Core Just works nicely under windows, not sure for the OSProcess thing as I did the build by hand in a side console. So: CCGExample new nbFib4: <print it> 30 90799453 It just works perfectly. That's a pretty great day for integration with JNIPort and CCodeGenerator! Phil --- Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com
Unbelievable... I stare how open source can work :-) I started this project yesterday so it can hardly translate more than the small examples and of course it had no announcement. So, CCodeGenerator is the standalone translator from Smalltalk to plain C extracted from VMMaker. It should be able now generate other projects than the VM. You can write a shared library in trimmed Smalltalk ( http://wiki.squeak.org/squeak/slang), debug it in Smalltalk IDE and then translate to C and compile. With NativeBoost binding (that will be generated in future versions automatically) you can use it simply from Smalltalk again. So you can write some parts of your projects in Smalltalk that will run on speed of C. Thank you Phil, I added you as a contributor. If others want to have write access to the repository, let me know. Cheers, -- Pavel 2014-03-26 0:39 GMT+01:00 Philippe Back <phil@highoctane.be>:
I loaded the code from http://www.smalltalkhub.com/#!/~PavelKrivanek/CCodeGenerator where the generator is now standalone, from VMMaker
I made my own little version here: http://www.smalltalkhub.com/#!/~philippeback/HOExtras/packages/CCodeGenerato...
Just works nicely under windows, not sure for the OSProcess thing as I did the build by hand in a side console.
So: CCGExample new nbFib4: <print it> 30 90799453
It just works perfectly.
That's a pretty great day for integration with JNIPort and CCodeGenerator!
Phil
------------------------------ <http://www.avast.com/>
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection Antivirus avast! <http://www.avast.com/> est active.
This is beautiful, indeed (both the project and the open-source dynamics) :). Keep it up. Cheers, Doru On Wed, Mar 26, 2014 at 6:37 AM, Pavel Krivanek <pavel.krivanek@gmail.com>wrote:
Unbelievable... I stare how open source can work :-) I started this project yesterday so it can hardly translate more than the small examples and of course it had no announcement.
So, CCodeGenerator is the standalone translator from Smalltalk to plain C extracted from VMMaker. It should be able now generate other projects than the VM. You can write a shared library in trimmed Smalltalk ( http://wiki.squeak.org/squeak/slang), debug it in Smalltalk IDE and then translate to C and compile. With NativeBoost binding (that will be generated in future versions automatically) you can use it simply from Smalltalk again. So you can write some parts of your projects in Smalltalk that will run on speed of C.
Thank you Phil, I added you as a contributor. If others want to have write access to the repository, let me know.
Cheers, -- Pavel
2014-03-26 0:39 GMT+01:00 Philippe Back <phil@highoctane.be>:
I loaded the code from
http://www.smalltalkhub.com/#!/~PavelKrivanek/CCodeGenerator where the generator is now standalone, from VMMaker
I made my own little version here: http://www.smalltalkhub.com/#!/~philippeback/HOExtras/packages/CCodeGenerato...
Just works nicely under windows, not sure for the OSProcess thing as I did the build by hand in a side console.
So: CCGExample new nbFib4: <print it> 30 90799453
It just works perfectly.
That's a pretty great day for integration with JNIPort and CCodeGenerator!
Phil
------------------------------ <http://www.avast.com/>
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection Antivirus avast! <http://www.avast.com/> est active.
-- www.tudorgirba.com "Every thing has its own flow"
On 26 Mar 2014, at 06:37, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Unbelievable... I stare how open source can work :-) I started this project yesterday so it can hardly translate more than the small examples and of course it had no announcement.
So, CCodeGenerator is the standalone translator from Smalltalk to plain C extracted from VMMaker.
One thing we need to do eventually is to have a SLANG that does not use the old AST and Parser⦠but the RB AST instead. Marcus
Le 26/03/2014 09:03, Marcus Denker a écrit :
On 26 Mar 2014, at 06:37, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Unbelievable... I stare how open source can work :-) I started this project yesterday so it can hardly translate more than the small examples and of course it had no announcement.
So, CCodeGenerator is the standalone translator from Smalltalk to plain C extracted from VMMaker.
One thing we need to do eventually is to have a SLANG that does not use the old AST and Parser⦠but the RB AST instead.
I'm curious about that. I'll have a look to see how hard it would be to make the change (I'm deep in parser and AST land at the moment). Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
On 26 Mar 2014, at 09:06, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Le 26/03/2014 09:03, Marcus Denker a écrit :
On 26 Mar 2014, at 06:37, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Unbelievable... I stare how open source can work :-) I started this project yesterday so it can hardly translate more than the small examples and of course it had no announcement.
So, CCodeGenerator is the standalone translator from Smalltalk to plain C extracted from VMMaker.
One thing we need to do eventually is to have a SLANG that does not use the old AST and Parser⦠but the RB AST instead.
I'm curious about that. I'll have a look to see how hard it would be to make the change (I'm deep in parser and AST land at the moment).
The nice thing would be that it would just a visitor⦠very similar to Opal: 1) do semantic analysis 2) a visitor emitting C code. Later one could then even have a real intermediate representation (maybe the one of Sista?) and do some optimisation there, with all control flow information instead of using the AST. Ah, and there is Waterfall: http://hal.inria.fr/hal-00871353 This already contains a SLANG based on the RB AST⦠but compiling with native boost ASMJIT as a backend, not C. Marcus
Le 26/03/2014 09:11, Marcus Denker a écrit :
On 26 Mar 2014, at 09:06, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Le 26/03/2014 09:03, Marcus Denker a écrit :
On 26 Mar 2014, at 06:37, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Unbelievable... I stare how open source can work :-) I started this project yesterday so it can hardly translate more than the small examples and of course it had no announcement.
So, CCodeGenerator is the standalone translator from Smalltalk to plain C extracted from VMMaker.
One thing we need to do eventually is to have a SLANG that does not use the old AST and Parser⦠but the RB AST instead.
I'm curious about that. I'll have a look to see how hard it would be to make the change (I'm deep in parser and AST land at the moment).
The nice thing would be that it would just a visitor⦠very similar to Opal: 1) do semantic analysis 2) a visitor emitting C code.
Yes, this is what I expected to find.
Later one could then even have a real intermediate representation (maybe the one of Sista?) and do some optimisation there, with all control flow information instead of using the AST.
Hum, this means however rewritting a bunch of compiler optimisation stuff.
Ah, and there is Waterfall: http://hal.inria.fr/hal-00871353
This already contains a SLANG based on the RB AST⦠but compiling with native boost ASMJIT as a backend, not C.
Cool. I'll read that. I'm on to some AST to LLVM-IR thing in an HPC-oriented European project, so I'll get first-hand knowledge of yet another path to binary generation. Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
2014-03-26 9:11 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:
On 26 Mar 2014, at 09:06, Goubier Thierry <thierry.goubier@cea.fr> wrote:
Le 26/03/2014 09:03, Marcus Denker a écrit :
On 26 Mar 2014, at 06:37, Pavel Krivanek <pavel.krivanek@gmail.com>
wrote:
Unbelievable... I stare how open source can work :-) I started this
project yesterday so it can hardly translate more than the small examples and of course it had no announcement.
So, CCodeGenerator is the standalone translator from Smalltalk to
plain C extracted from VMMaker.
One thing we need to do eventually is to have a SLANG that does not use the old AST and Parser... but the RB AST instead.
I'm curious about that. I'll have a look to see how hard it would be to make the change (I'm deep in parser and AST land at the moment).
The nice thing would be that it would just a visitor... very similar to Opal: 1) do semantic analysis 2) a visitor emitting C code.
Later one could then even have a real intermediate representation (maybe the one of Sista?) and do some optimisation there, with all control flow information instead of using the AST.
Ah, and there is Waterfall: http://hal.inria.fr/hal-00871353
This already contains a SLANG based on the RB AST... but compiling with native boost ASMJIT as a backend, not C.
Cool! I knew that Cami & Co. are working on something like that but not that they are so far. We need to have both options, translate to C and to native code. One reason why I tried to make the translator standalone is to help to finally make VMMaker more modular. So the question is how far can we go to keep the linkage to VM development (that takes more Smalltalk implementations into account). Cheers, -- Pavel
Marcus
C-code generation is what I am interested in. To integrate with third parties, one likes to put C-code strings directly in the Slang bits. AsmJIT, not so much. Especially if we hook a debugger to the process and what to see whatÂs going on Phil From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of Pavel Krivanek Sent: mercredi 26 mars 2014 10:24 To: Any question about pharo is welcome Subject: Re: [Pharo-users] Pavel's CCodeGenerator works under Windows MinGW: sweet 2014-03-26 9:11 GMT+01:00 Marcus Denker <marcus.denker@inria.fr <mailto:marcus.denker@inria.fr> >: On 26 Mar 2014, at 09:06, Goubier Thierry <thierry.goubier@cea.fr <mailto:thierry.goubier@cea.fr> > wrote:
Le 26/03/2014 09:03, Marcus Denker a écrit :
On 26 Mar 2014, at 06:37, Pavel Krivanek <pavel.krivanek@gmail.com
<mailto:pavel.krivanek@gmail.com> > wrote:
Unbelievable... I stare how open source can work :-) I started this
project yesterday so it can hardly translate more than the small examples and of course it had no announcement.
So, CCodeGenerator is the standalone translator from Smalltalk to plain
C extracted from VMMaker.
One thing we need to do eventually is to have a SLANG that does not use the old AST and Parser but the RB AST instead.
I'm curious about that. I'll have a look to see how hard it would be to make the change (I'm deep in parser and AST land at the moment).
The nice thing would be that it would just a visitor very similar to Opal: 1) do semantic analysis 2) a visitor emitting C code. Later one could then even have a real intermediate representation (maybe the one of Sista?) and do some optimisation there, with all control flow information instead of using the AST. Ah, and there is Waterfall: http://hal.inria.fr/hal-00871353 This already contains a SLANG based on the RB AST but compiling with native boost ASMJIT as a backend, not C. Cool! I knew that Cami & Co. are working on something like that but not that they are so far. We need to have both options, translate to C and to native code. One reason why I tried to make the translator standalone is to help to finally make VMMaker more modular. So the question is how far can we go to keep the linkage to VM development (that takes more Smalltalk implementations into account). Cheers, -- Pavel Marcus --- Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com
Impressive! Very interesting. Thierry Le 26/03/2014 06:37, Pavel Krivanek a écrit :
Unbelievable... I stare how open source can work :-) I started this project yesterday so it can hardly translate more than the small examples and of course it had no announcement.
So, CCodeGenerator is the standalone translator from Smalltalk to plain C extracted from VMMaker. It should be able now generate other projects than the VM. You can write a shared library in trimmed Smalltalk (http://wiki.squeak.org/squeak/slang), debug it in Smalltalk IDE and then translate to C and compile. With NativeBoost binding (that will be generated in future versions automatically) you can use it simply from Smalltalk again. So you can write some parts of your projects in Smalltalk that will run on speed of C.
Thank you Phil, I added you as a contributor. If others want to have write access to the repository, let me know.
Cheers, -- Pavel
2014-03-26 0:39 GMT+01:00 Philippe Back <phil@highoctane.be <mailto:phil@highoctane.be>>:
I loaded the code from http://www.smalltalkhub.com/#!/~PavelKrivanek/CCodeGenerator where the generator is now standalone, from VMMaker____
__ __
I made my own little version here: http://www.smalltalkhub.com/#!/~philippeback/HOExtras/packages/CCodeGenerato...
__ __
Just works nicely under windows, not sure for the OSProcess thing as I did the build by hand in a side console.____
__ __
So: CCGExample new nbFib4: <print it> 30 90799453____
__ __
It just works perfectly.____
__ __
Thatâs a pretty great day for integration with JNIPort and CCodeGenerator!____
__ __
Phil____
__ __
------------------------------------------------------------------------ <http://www.avast.com/>
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection Antivirus avast! <http://www.avast.com/> est active.
-- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
participants (5)
-
Goubier Thierry -
Marcus Denker -
Pavel Krivanek -
Philippe Back -
Tudor Girba