Code Monkey home page Code Monkey logo

Comments (2)

klange avatar klange commented on May 25, 2024
  • Kuroko is intended to be used as an embedded scripting language: it was designed to write extensions and config files for my text editor, and later as a general scripting language for my OS project. With those goals in mind, I built Kuroko to have a small footprint - it requires only a handful of libc functions, has no external dependencies, and can be built for virtually any platform. I consider these to be core aspects of the language.
  • Native compilation requires a code gen backend. Some languages go about this by having a "transpiler" that converts source code to another language and then uses that language's compiler to build a binary - this obviously introduces a dependency on another compiler. More mature languages would use a compiler backend like LLVM - which, again, is a large external dependency. The "do it myself" hobbyist approach is to write your own code gen, but that is a dreadfully difficult task, especially if you want any of the performance benefits that are expected from "compiling to native code".
  • Kuroko is a dialect of Python, and with that design comes a lot of things that are ill suited to static, native compilation. Most of that isn't so much in the syntax, but in the expectations of the runtime. Building a natively-compiled language with all the same semantics is doable (see Cython, which achieves this by compiling "pure Python" to equivalent C code that uses the CPython APIs to do what the bytecode eval loop would do anyway), but it has limited benefits on its own and it takes a lot of restrictions on the language to see real performance gains.

Would I like to see a Cython equivalent for Kuroko? I think it would be neat. Do I have the time to pursue something like that myself? Not at the moment. And, besides, if and when I do have the opportunity to work on a natively-compiled language, I would make very different design decisions than trying to emulate Python as I have with Kuroko.

from kuroko.

Justaus3r avatar Justaus3r commented on May 25, 2024

Ah thanks for letting me know.i know about cython but i thought it used some bulky dlls .there is also another project called nuitka which compiles all python constructs to c and uses libpython.well anyway sorry for the silly question and thanks.

from kuroko.

Related Issues (20)

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.