Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elt crash #553

Closed
Ilir-Liburn opened this issue Sep 26, 2022 · 7 comments
Closed

elt crash #553

Ilir-Liburn opened this issue Sep 26, 2022 · 7 comments
Assignees
Labels
Milestone

Comments

@Ilir-Liburn
Copy link

Hello,

while running elt, I entered exit command (my habit) causing crash, e.g. starting debugger in postmortem mode.

  • OS: Windows 10 Pro 64 bit
  • Version: ELENA VM 5.2.17
@arakov
Copy link
Member

arakov commented Sep 26, 2022

Thanks. I will check

@arakov arakov self-assigned this Sep 26, 2022
@arakov arakov added the bug label Sep 26, 2022
@arakov arakov added this to the ELENA 6.0 milestone Jun 21, 2023
@arakov
Copy link
Member

arakov commented Jun 21, 2023

The bug is fixed in the upcoming version - 6.0.4.

@arakov
Copy link
Member

arakov commented Jun 21, 2023

Closing the ticket. @Ilir-Liburn, please, fill free to reopen it if after the release (somewhen around start of July) if the problem still exists for you

@arakov arakov closed this as completed Jun 21, 2023
@Ilir-Liburn
Copy link
Author

Hello,

what is equivalent to elt (Virtual machine console) in upcoming version? Can compiled and linked code use eval (is it possible outside the VM)?

@arakov
Copy link
Member

arakov commented Jun 21, 2023

Hi,
it will be called - elt-cli.exe

Yes, stand-alone executable can use the scripting as well. See for example this tutorial - https://github.com/ELENA-LANG/tutorials/tree/master/ExpressionTree2 . Of course all used classes and messages should be declared.

The simplest code can look like this:

import extensions;
import extensions'scripting;
   
public program()
{
    var t := new ScriptEngine()
            .loadScript("[[ #grammar build ]]")
            .loadPath("~\scripts\grammar60.es")
            .loadPath("~\scripts\tscript60.es");
            
    var o := t.buildScript("public program() { console.writeLine(""Hello World"") }");

    o.eval();
}

Of course, there are things to work on. For example the extensions are not yet supported, I'm working on it. Currently it is done only for windows x86. With time I will migrate it to all remaining platforms

ELENA will support the user-defined grammar for source files as well.

@Ilir-Liburn
Copy link
Author

Thanks,

first one is about user defined scripts, second is about executing Elena code, right? If yes, can eval create classes/methods, functions, etc?

@arakov
Copy link
Member

arakov commented Jun 21, 2023

User-defined grammar will generate the normal codes with classes & symbols and be executed as a normal code.

Evaluation of the code in run-time will be able to create the classes as well (in ELENA, a function is a special case of a class).
Though it is not normal class. It is a mix-in. You can use it but you cannot inherit it (at least currently, maybe some form of inheriting can be implemented). But for the most of the cases, it will be a normal class. You can call a method, pass it further and so on. I'm not yet 100% finish with it, it is possible to create a singleton. I will add support for classes which can be created later. Another limitation, that you cannot inherit from another class. Though I think I will be able to support the interfaces.

@arakov arakov mentioned this issue Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants