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

A couple of questions if I may... #16

Closed
stefanos82 opened this issue Jan 18, 2019 · 7 comments
Closed

A couple of questions if I may... #16

stefanos82 opened this issue Jan 18, 2019 · 7 comments

Comments

@stefanos82
Copy link

stefanos82 commented Jan 18, 2019

First of all, congrats for this amazing project. Well done @d5.

I hope my HN post to bring more people in because this project looks promising.

I have a couple of questions:

  • What about concurrency?
  • More examples around standalone language please? I have tried to use a simple print('hello world') and couldn't make it work.
  • Is each file considered a module that gets namespaced by default?
  • Can Tengo use Go's existing modules? That is, is there any interoperability between the two?
  • When compiling to a binary file, do we have the same concept as Go's, such as choosing the system we want to build a binary for or an architecture of our choice?
  • Benchmarks in the nearest future please...
  • Maybe standard Tengo libraries?

That's it for now, I cannot think of anything else.

As soon as you provide more examples, I will start playing with it to see how I could use it and see whether I could replace some ancient shell scripting projects of mine or not.

Let me know.

Cheers.

@ghost
Copy link

ghost commented Jan 18, 2019

As for the standard libraries part: Standard-Libraries

@d5
Copy link
Owner

d5 commented Jan 18, 2019

Thanks for the kind words and the HackerNews share. But I'm not sure if Tengo's ready for HN 😄

Let me try to answer your questions, but, please know that Tengo is fairly new and there are tons of things to add going forward.

  • Language-level support for concurrency is something I need to think about. Tengo was not to replace something entirely. (Maybe in the far future..?) So, honestly, I don't have a clear plan for this, but, I'm always open to ideas/proposals.
  • I've been focusing on implementing the cores, and, didn't really spend enough time on documentations and examples. But I plan to add more and more. Also please shoot me an email or create an issue if something doesn't work. (Also, I don't know that's the issue or not, but, note that you should use double quotes (") for strings.)
  • This may change (or extended) in the future, but, currently a file correspond to a module that can be imported to other scripts/modules. And each module gets not just their own namespace but also their own VM actually. And the importing script (code calling import()) get the global variables of the module as an immutable map object.
  • Interoperability is critical as an embedded language for sure. There are couple different ways for doing it, but, currently the easiest way is to implement objects.Object interface and use it in the same way as other primitive types. (See Counter example code in README.) I'm planning to add more interoperability features, and, like always, challenging part is to make it work without losing any performance.
  • Compiling native executables is in the development roadmap. Currently you can use tengo CLI tool (which can be built cross-platform) to compile and run the binaries. It's like you use java or python to run their source or binaries in the platform agnostic way.
  • Benchmark in README unless you mean something else.

@stefanos82
Copy link
Author

As for the standard libraries part: Standard-Libraries

Thank you @mdbazuin, that's good to know 😃

@stefanos82
Copy link
Author

Thanks for the kind words and the HackerNews share.
But I'm not sure if Tengo's ready for HN smile

I'm sure it does. One person that commented on it and said "I do like this idea though and think I have an application for it", so there you have it.

Let me try to answer your questions, but, please know that Tengo is fairly new
and there are tons of things to add going forward.

* Language-level support for concurrency is something I need to think about. 

Tengo was not to replace something entirely. (Maybe in the far future..?)
So, honestly, I don't have a clear plan for this, but, I'm always open to ideas/proposals.

By concurrency I mean using all the CPU cores,

No need to replace anything, more and more languages pop up like mushrooms, but none of them performs as fast as Tengo. People love speed and readability.

So, since Tengo has both, why not use it as a standalone language?

  • I've been focusing on implementing the cores, and, didn't really spend
    enough time on documentations and examples.
    But I plan to add more and more. Also please shoot me an email or
    create an issue if something doesn't work.
    (Also, I don't know that's the issue or not, but, note that you should use double quotes (") for strings.)

I think we need more examples about the proper usage of Tengo, because it's not clear yet how it should be used.

* This may change (or extended) in the future, but, currently a file correspond to 

a module that can be imported to other scripts/modules. And each module gets not
just their own namespace but also their own VM actually. And the importing script
(code calling import()) get the global variables of the module as an immutable map object.

Ah I see, this is clearer now.

* Interoperability is critical as an embedded language for sure. 

There are couple different ways for doing it, but, currently the easiest way is to implement
objects.Object interface and use it in the same way as other primitive types.
(See Counter example code in README.) I'm planning to add more interoperability features,
and, like always, challenging part is to make it work without losing any performance.

Yeah, I understand.

  • Compiling native executables is in the development roadmap.
    Currently you can use tengo CLI tool (which can be built cross-platform) to compile
    and run the binaries. It's like you use java or python to run their source or binaries
    in the platform agnostic way.

Awesome! I can't wait to use it 😃

* [Benchmark](https://github.com/d5/tengo#benchmark) in README 

unless you mean something else.

By benchmarks I mean something like https://benchmarksgame-team.pages.debian.net/benchmarksgame/

@d5
Copy link
Owner

d5 commented Jan 20, 2019

@stefanos82 I'm curious to know what you think of roadmap that I had updated recently. Any feedback/thoughts would be appreciated.

@stefanos82
Copy link
Author

A dream coming true! Go for it 👍

@d5
Copy link
Owner

d5 commented Jan 20, 2019

Great. I will close this issue then. Thanks for the help!

@d5 d5 closed this as completed Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants