elena-lang
elena-lang copied to clipboard
ELENA on Rails
We need to start thinking of a way to implement a way to develop websites in ELENA.
For the HTML response, we can get an idea from Ruby on Rails, it use a HAML as html format, maybe we can use it too, so, implementing a HAML processor/compiler that generates the HTML code at request time.
( probably, the more conniving way... ) as @arakov said, use the elena script with html to generate the pages.
My question is, how about mix the html code with ecode, I mean.... use elena code inside of html code in page generation... for example:
%import system.
%import extensions.
<p>Some numbers:</p>
<ul>
%%
0 to:10 runEach:( :o)
[
@<li>%%(o literal)%%</li>
].
%%
</ul>
What is the possibility of developing this? Is it more simpler to implement the Elena Script for this case ?
Issue references: #34 #35
Yes, I'm planning to use a script engine for these type of operations
Ok! Maybe something like Python+Django can be did...
{% for usrs in users_formset %}
<div class="users-forms form-group">
{{ usrs.as_p }}
</div>
{% endfor %}
What's why I'm developing a script engine. Potentially you may support a lot of different scripts 😄
https://bitbucket.org/syncfusiontech/web-servers-succinctly/src 1452.pdf
https://diamondmvc.github.io/Diamond/
Maybe, we can start to think about use the WebAssembly... Look good resources
- https://github.com/ncave/dna-redux
- https://becominghuman.ai/passing-and-returning-webassembly-array-parameters-a0f572c65d97
- https://medium.com/@tdeniffel/c-to-webassembly-pass-and-arrays-to-c-86e0cb0464f5
- https://livebook.manning.com/book/webassembly-in-action/c-emscripten-macros/v-7/36
So, building the script interpreter in for W.A and use it to interpret the ELENA Script, thus reducing the need to use JS