[squeak-dev] TR: High language to express low level code
pierre_misse25 at msn.com
Mon Apr 8 16:16:47 UTC 2019
Thank you guys for your answers !
@Dave Thank you for the precisions.
I actually had read this article, and
-Extending the Squeak Virtual Machine by Andrew C. GreenBerg
-Two decade of Smalltalk VM Development by Eliot Miranda , Clement Bera, Elisa Gonzalez Boix, and Dan Ingallls.
But i didn't find much more on how it works. I was looking at it mostly from the transpilation point of vue. I'll have to take a closer look at TMethod/TparseNode/CCodeGenerator !
Did you mean "which is written primarily in SLANG"? For now I'm taking it as "the slang translator translate Smalltalk code" which feels weird to me.
"That depends on the architecture you choose."
I completely agree, and should have been more precise.
I tend to think of a static approach so far. Taking my language, translating it to C, then letting C files be compiled in assembly by a random c compiler (probably GCC). I'd like to be able to express both stand alone program, and libraries.
I actually read up on Sista on Clement's blog.
I also read an article on LowCode.
But as you just read, those approaches aren't really what I aim for !
'I don't have time or resources to explore the inessential ;-)'
True that ! But I meant more something that poped into your head, without having the time to follow up :p
'For me C is an implementation language; a portable assembler.'
I get this point of vue. But I meant something like what you have to use, because it's important but is annoying. The usual example is memory management (at least in general) which is why we have so much garbage collectors ! In that feeling, Hiding memory management in the transpiler would result for example in garbage collection[...]. I was trying to ask what do you have to manage, but bothers you, to see if it's possible to hide it. For example, I think in Slang, you don't bother about memory management, but you do require types. I don't know if that's more understandable.
De : Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> de la part de Eliot Miranda <eliot.miranda at gmail.com>
Envoyé : mardi 2 avril 2019 18:09
À : The general-purpose Squeak developers list
Objet : Re: [squeak-dev] High language to express low level code
On Mon, Apr 1, 2019 at 11:03 PM pierre misse <pierre_misse25 at msn.com<mailto:pierre_misse25 at msn.com>> wrote:
I'm currently trying to create a "high" level language to that aims to express low level concepts through transpilation to C.
I have a limited experience building such programs, and thought people who build virtual machines would be the right group of people to ask what they need in low level programing!
I've also made some research, and stumbled Slang, on which i found little documentation (probably because i didn't find the right combination of words).
So if you have a bit of time to share, i'd love to know:
* What you kind of concepts you need
That depends pn the architecture you choose. There are static and dynamic approaches, approaches centered around optimization and JIT com platoon and approaches centered around embedding a domain-specific language (DSL) in a high-level language to allow for specific low-level code to be generated.
I would love for you to direct your attention to Ronie Salgado's work on Lowcode, and Clément Béra's and my work on Sista and Scorch. Ronie's work is a combination of providing a DSL for communicating with graphics renderers. This fairs within the extensions to the bytecode set Clément and I have designed for aggressive adaptive optimization in the context of a JIT. Note that Ronie's subset of bytecodes has also shown speedups in a pure interpreter. We have papers on both systems.
* What's not required, but interesting
I don't have time or resources to explore the inessential ;-)
* What you'd wish to hide from C to be taken care of by the transpiler
For me C is an implementation language; a portable assembler. There really isn't any need to hide anything from C. But the only time I pay attention to C is when I have to debug the system in the C world, which is thankfully rare, or shen the transpolar has a bug which manifests as a failure for the C to compiler. So it's not an issue of hiding or revealing things to C. It's an issue of C not being a useful context in which to get work done. It's effectively write-only.
Thank you in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev