This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.core.reducers :as r]) | |
(defn wait [millis] | |
#?(:clj (Thread/sleep millis) | |
:clje (timer/sleep millis))) | |
(defmacro times | |
{:added "1.0"} | |
[& exprs] | |
`(do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ants.core) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Copyright (c) 2008 Rich Hickey. All rights reserved. | |
; The use and distribution terms for this software are covered by the | |
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php) | |
; which can be found in the file CPL.TXT at the root of this distribution. | |
; By using this software in any fashion, you are agreeing to be bound by | |
; the terms of this license. | |
; You must not remove this notice, or any other, from this software. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
erl -pa "%CD%/_build/default/lib/clojerl/ebin" -s clojerl_cli start -noshell +pc unicode -extra -r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module 'example' ['f'/1, | |
'module_info'/0, | |
'module_info'/1] | |
attributes [] | |
'f'/1 = fun (_1) -> | |
case <_1> of | |
<~{'foo':='foo'}~> when 'true' -> | |
_1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns vector-comparison) | |
(defn compare-creation [] | |
(doseq [n [0 100 1000 10000]] | |
(println "compare-creation with" n) | |
(let [coll (->erl (range n)) | |
runs 10000] | |
(simple-benchmark [] (array/from_list coll) runs) | |
(simple-benchmark [] (clj_vector/new coll) runs)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns fn-pred) | |
(defn fn?-1 | |
"Returns true if x is either a function" | |
{:added "1.0"} | |
[x] (erlang/is_function x)) | |
(defn fn?-2 | |
"Returns true if x is a function" | |
{:added "1.0"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Installer for SVOX Pico TTS on non-Debian platforms | |
# Author: Steven Mirabito <[email protected]> | |
# Check architechure | |
if [ $(uname -m) == 'x86_64' ]; then | |
pkgarch="amd64" | |
else | |
pkgarch="i386" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ./ -type f -name '*.wsp' -exec whisper-resize.py --nobackup {} 10s:6h 10min:180d 12h:2y \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module = | |
{c_module,[], | |
{c_literal,[],cerl_eval0}, | |
[{c_var,[],{eval,0}}, | |
{c_var,[],{module_info,0}}, | |
{c_var,[],{module_info,1}}], | |
[{{c_literal,[],clojure},{c_literal,[],true}}], | |
[{{c_var,[],{eval,0}}, | |
{c_fun,[],[], | |
{c_case,[1,{file,[]}], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.walk :as walk]) | |
(walk/macroexpand-all '(loop [[x & xs] xs a 3])) | |
(let* [G__1249 xs | |
vec__1250 G__1249 | |
x (clojure.core/nth vec__1250 0 nil) | |
xs (clojure.core/nthnext vec__1250 1) | |
a 3] | |
(loop* [G__1249 G__1249 a a] | |
(let* [vec__1251 G__1249 |
NewerOlder