GithubHelp home page GithubHelp logo

Efficiency? about orion HOT 17 CLOSED

wafelack avatar wafelack commented on June 30, 2024
Efficiency?

from orion.

Comments (17)

Wafelack avatar Wafelack commented on June 30, 2024 1

Ehh based on your benchmarks that seems to make it less efficient in comparison to old orion?

I talked about the compiler branch. https://github.com/orion-lang/orion/tree/compiler#ack-3-3

from orion.

Kreyren avatar Kreyren commented on June 30, 2024 1

That looks better. Still too slow for me, but that makes it usable.

from orion.

Wafelack avatar Wafelack commented on June 30, 2024

Hello,
I plan to make it run over a Virtual Machine in the future, so the performance could be improved a lot.

from orion.

Kreyren avatar Kreyren commented on June 30, 2024

Why a virtual machine?

from orion.

Wafelack avatar Wafelack commented on June 30, 2024

For two majors reasons, the first is learning how to make a language vm, the second is because i think that it is easier to have good performances on a VM.

from orion.

Kreyren avatar Kreyren commented on June 30, 2024

Do you think that you can make it more efficient then lisp using VM?

FWIW I would suggest handling to LLVM https://llvm.org/ which is what rustlang is doing as i see it having a bigger potential to be more efficient and the value from learning it is also more significant or going the lisp way and compiling everything into a binaries that are then executed.

from orion.

zaidharoon001 avatar zaidharoon001 commented on June 30, 2024

Hey guys, I was thinking of having a transpiler for Orion because going through "interpreter.rs", it seems like Orion can be transpiled quite efficiently to a dynamically typed language like Lua or perhaps even to a statically typed functional one such as OCaml/Haskell. This could provide a solid middle ground between @Wafelack's suggestion of writing a VM and @Kreyren's suggestion of using LLVM. I might even be able to contribute to such a project since I have also created a purely functional, dynamically typed language but the only major difference(other than it not being a LISP) is that it's lazily evaluated.

from orion.

Kreyren avatar Kreyren commented on June 30, 2024

Meh kinda loses its meaning if its just stupid translator to a different lang imho. O.o

I was hoping to integrate it into my package manager along side of rlisp tbh

But FWIW i aint agains it being a cargo feature to be used on demand during compilation

from orion.

zaidharoon001 avatar zaidharoon001 commented on June 30, 2024

What language is this package manager written in? And more specifically what integration do you plan? Since writing a straight compiler to LLVM seems difficult for a language that has closures and other insanely high-level constructs but I feel like transpiling to C/Rust/another language would be easier and would also provide benefits similar to AOT compilation to LLVM. JIT though, is just another beast.

Also, why would transpiling make it lose its meaning?

from orion.

Kreyren avatar Kreyren commented on June 30, 2024

What language is this package manager written in? @ameerwasi001

Designed to be rewritten in all langs with custom file hierarchy and builder (expected to build itself as a package manager for programming langs) to allow cherrypicking of lang per component with preference for rustlang.

And more specifically what integration do you plan? @ameerwasi001

Ideally i want to make an interpretor to which i can parse a file with processing instructions and link it to a functions from library that has orion built-in and that calls orion from the system depending on choices made during compilation.


I don't think that LLVM is difficult to integrate here, but i agree that it takes more resources to integrate compared to lang translator that in it's simplest form is just optimizing regular expression.


Also, why would transpiling make it lose its meaning?

LISP is a unique lang that compiles itself, this is lisp-inspired lang, so i would argue it being better if it follow these steps instead of wasting time with transpiling that would just make it into "another generic lang" as the uniqueness, efficiency and compatibility of this lang is what is making me interested in it. ^-^

from orion.

zaidharoon001 avatar zaidharoon001 commented on June 30, 2024

If Orion doesn't do any runtime modifications to the AST then I would argue that all of the merits you list can be kept while transpiling to another programming language but for your specific case, I do agree that transpiling would make integration difficult.

I think if we limit AST modifications to macros at the compile-time, we can effectively compile it to most programming languages without changing any of its design. As you point out, LLVM would not be difficult but it would not be an easy task either and I do not see a very good reason to go with it over something like transpiling to C.

from orion.

Kreyren avatar Kreyren commented on June 30, 2024

i personally do not tolerate any inefficiency in my code thus why i think that LLVM would be more efficient compared to C or even making a custom thing, but in general the more efficient orion is the more usable it is.

from orion.

thomasvergne avatar thomasvergne commented on June 30, 2024

Just for the lambda system in the language, it would require a rewrite of the parser or at least of another big part of the core in order to be able to linearize everything (I'm thinking in particular of the problem of closures when I refer to lambdas). Anyway, all this to say that it's not that easy to prepare the language for compilation.

Unless LLVM can handle this easily, I have never been interested in closures and their compilation with LLVM..

from orion.

Wafelack avatar Wafelack commented on June 30, 2024

@Kreyren So I moved Orion to a VM, and that improved efficiency a lot. You can check the compiler branch and take a look at the benchmarks.

from orion.

Kreyren avatar Kreyren commented on June 30, 2024

Ehh based on your benchmarks that seems to make it less efficient in comparison to old orion?

image

from orion.

Kreyren avatar Kreyren commented on June 30, 2024

FWIW would prefer orion to be more efficient then python at least, note low-power devices being a concern for my use.

from orion.

Wafelack avatar Wafelack commented on June 30, 2024

If it is too slow for you, don't use a toy interpreted language.

from orion.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.