Git Product home page Git Product logo

uclj's Introduction

uclj

A small, quick-starting, native Clojure interpreter.

It is built on top of the Clojure JVM runtime, but the parts that need dynamic class loading have been reimplemented in Clojure so that it could be compiled into a native application.

Features

Usage

Download the binary from the Release page and run the uclj command:

  • call uclj without parameters to get a REPL
  • call uclj filename.clj to load a file
  • call uclj filename.clj --test to load a file and then run all test cases in it
  • call uclj '(...)' to evaluate a Clojure expression. (It must start with a ( character.)

Build

You can also build the binary yourself. You will need Leiningen and GraalVM to build the application. Set the GRAALVM_HOME environment variable and run the build-graal.sh script.

License

Copyright © 2022 Janos Erdos

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.

uclj's People

Contributors

erdos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

0xack13

uclj's Issues

object array types

missing from native. see test case: (into-array [1.0])
Also consider multi-dimensional arrays! An Object[][][]... would be a good default.

affected:

  • object-array
  • make-array

decrease bloated binary size

native binary is huge, lets remove unused parts to reduce size. idea: we an alter-var-root unused vars to nil.

Size history:

  • version 0.1.3 from on release page: 98,591,600 bytes (with graalvm 21.3.0)
  • version 0.1.3 built locally: 82,711,760 bytes (with graalvm 21.3.0) (what is the reason for difference??)
  • latest built locally: 82,846,928

update statistics

thanks to the excellent work put in bb, latest versions perform much better!

[erdos@fedora uclj]$ bb --version
babashka v0.8.157
[erdos@fedora uclj]$ bb ./benchmark.clj
| test case  | uclj       | bb         | clojure
| day1.clj   | 44+1       | 37+2       | 929+26
| day2.clj   | 63+2       | 40+1       | 1045+43
| day3.clj   | 98+2       | 98+4       | 1151+34
| day4.clj   | 242+10     | 245+9      | 1133+40
| day5.clj   | 5107+139   | 5394+166   | 2728+83
| day6.clj   | 35+3       | 14+1       | 980+42
| day7.clj   | 1815+60    | 2162+81    | 1227+48
| day8.clj   | 124+5      | 94+3       | 1177+62
| day9.clj   | 524+22     | 327+15     | 1227+50
| day11.clj  | 651+45     | 489+21     | 1287+47
| day17.clj  | 4633+228   | 1719+147   | 1556+149
| day19.clj  | 3256+252   | 3539+115   | 3063+272
| day24.clj  | 1846+42    | 3682+185   | 1615+79

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.