You need to first install GraalVM, and then set your PATH so that you
get the GraalVM binaries (incluing the GraalVM version of node).
You can then install R and Ruby via
gu -c install org.graalvm.r
gu -c install org.graalvm.ruby
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <script src="https://unpkg.com/three"></script> | |
| <script | |
| src="https://unpkg.com/three/examples/js/loaders/GLTF2Loader.js" | |
| ></script> | |
| <script src="script.js" defer="defer"></script> | |
| </head> |
| (def db (atom nil)) | |
| (defn error [e] | |
| (.error js/console "An IndexedDB error has occured!" e)) | |
| (defn new [cb] | |
| (let [version 1 | |
| request (.open js/indexedDB "lokate" version)] | |
| (set! (.-onupgradeneeded request) (fn [e] | |
| (reset! db (.. e -target -result)) |
| ;; | |
| ;; Making a deeply nested map by following parent-child relations between items | |
| ;; | |
| (defn make-items [n] | |
| (concat [{:id 0 :name "item-root"}] | |
| (for [x (range 1 n)] {:id x :parent (dec x) :item (format "item-%d" x)}))) | |
| (defn item-children [item coll] | |
| (if-let [children (-> (filter #(= (:parent %) (:id item)) coll) seq)] |
| (defn children [item coll] | |
| (-> (filter #(= (:parent %) (:id item)) coll) | |
| seq)) | |
| (defn item-children | |
| ([get-children item coll] | |
| (if-let [xs (get-children item coll)] | |
| (map #(lazy-seq (cons item (item-children get-children % coll))) xs) | |
| (list [item nil]))) | |
| ([item coll] (item-children (memoize children) item coll))) |
You need to first install GraalVM, and then set your PATH so that you
get the GraalVM binaries (incluing the GraalVM version of node).
You can then install R and Ruby via
gu -c install org.graalvm.r
gu -c install org.graalvm.ruby
| (define-module (my packages) | |
| #:use-module ((guix licenses) #:prefix license:) | |
| #:use-module (gnu packages linux) | |
| #:use-module (guix build-system trivial) | |
| #:use-module (gnu) | |
| #:use-module (guix download) | |
| #:use-module (guix git-download) | |
| #:use-module (guix packages)) | |
| (define (linux-nonfree-urls version) |
| int steps = 40; | |
| Orbiter[] Orb = new Orbiter[steps]; // tmpX, tmpY, tmpOff, tmpDiam, tmpIncr | |
| float r = 0; | |
| float rad, off; | |
| float the = 0; | |
| void setup() { | |
| float x, y; | |
| size(500, 500); | |
| background(0); |
| class ClojureWrap(ns: String, objName: String) { | |
| import clojure.lang.{RT,Var} | |
| import scala.collection.mutable.HashMap | |
| RT.loadResourceScript(objName+".clj") | |
| val obj = ns+"."+objName | |
| val funcs = new HashMap[String, Var] | |
| def /(func: String, a: Any): Object = | |
| funcs.getOrElseUpdate(func, RT.`var`(obj, func)).invoke(a.asInstanceOf[Object]) |
| (ns jme3-example.core | |
| (:import com.jme3.app.SimpleApplication | |
| com.jme3.material.Material | |
| com.jme3.math.Vector3f | |
| com.jme3.scene.Geometry | |
| com.jme3.scene.shape.Box | |
| com.jme3.texture.Texture)) | |
| (defn application | |
| "Create an jMonkeyEngine application." |
| // MIT License - Copyright (c) 2016 Can Güney Aksakalli | |
| // https://aksakalli.github.io/2014/02/24/simple-http-server-with-csparp.html | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Net.Sockets; | |
| using System.Net; | |
| using System.IO; |