• Stars
    star
    140
  • Rank 261,473 (Top 6 %)
  • Language
    Clojure
  • Created over 12 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Practical unit-of-measure calculator DSL for Clojure / ClojureScript

Frinj

Frinj is a practical unit-of-measure calculator DSL for Clojure / ClojureScript.

Key features;

  • Tracks units of measure through all calculations allowing you to mix units of measure transparently
  • Comes with a huge database of units and conversion factors
  • Supports live unit feeds like currency conversion
  • Inspired by the Frink project (http://futureboy.us/frinkdocs/)
  • Tries to combine Frink's fluent calculation style with idiomatic Clojure
  • Supports infix calculation style

Usage

Add the following line into your Leiningen :dependencies [frinj "0.2.5"].

Clojure

user=> (use 'frinj.repl)
user=> (frinj-init!)
user=> (override-operators!)
user=> (fj 2000 :Calories :per :day :to :watts)
;; "1163/12 (approx. 96.91666666666667) [dimensionless]"

ClojureScript

There are a few differences when running Frinj on Node / in a browser. See this wiki page for details.

Browser demo

Visit the browser demo here

To generate the browser demo, run lein cljsbuild once. Then start a web server in the browser-example directory, and visit it. You should see the examples page.

For example;

$ cd browser-demo
$ python -m SimpleHTTPServer

then visit http://localhost:8000 in a browser and click on the demo.html file.

Examples

Finally, check out the wiki from more info.

License

Copyright (C) 2013 Martin Trojer

Distributed under the Eclipse Public License, the same as Clojure.

More Repositories

1

pipejine

Flexible, Safe and Simple Multi-Consumer/Producer Clojure Pipelines
Clojure
59
star
2

go-tutorials-core-async

Some go tutorials converted to core.async
Clojure
58
star
3

datalog

contrib.datalog brought back to life
Clojure
53
star
4

cljs-nodejs-coreasync-bootstrap

Scaffold setup for some ClojureScript, node.js, core.async action
Clojure
31
star
5

scheme-scala

Interpreter of (a subset of) the Scheme programming language, in Scala
Scala
29
star
6

symbolic-execution

Applied Symbolic Execution with KLEE/LLVM
C++
24
star
7

frins

A practical unit-of-measure calculator DSL for Scala
Scala
15
star
8

scheme-clojure

Scheme in Clojure
Clojure
14
star
9

devbox

Puppet
10
star
10

devbox-docker

Development environments in docker containers
Makefile
9
star
11

simulant-bootstrap

Simulant bootstrap project
Clojure
7
star
12

qemu-syborg

QEMU virtual platform, Symbian baseport (BSP) and tools
C
7
star
13

edn-scala

An EDN format reader/writer for Scala
Scala
6
star
14

reasoned-schemer-core.logic

Reasoned Schemer in core.logic
Clojure
6
star
15

clojure-coreclr

Clojure running on the CoreCLR
Makefile
5
star
16

atom-scala

Clojure-style Atoms for Scala
Scala
4
star
17

beyond-clojure

Code repo for Beyond Clojure blog series
Elm
3
star
18

dotfiles

Emacs Lisp
3
star
19

scheme-fsharp

Interpreter of (a subset) Scheme in F#
F#
3
star
20

realworldocaml

https://realworldocaml.org and http://ocaml.org/learn/tutorials/99problems.html
OCaml
2
star
21

mtorrent

A fast, lightweight, head-less, curses based, configurable torrent client.
Python
2
star
22

euroclojure-demo

Sources for the Xively EuropClojure demo
Clojure
1
star
23

scheme-haskell

Haskell
1
star
24

scheme-java

Scheme in Java8
Java
1
star
25

mtorrent-go

Torrent client with a web-UI based on libtorrent-rasterbar
Go
1
star
26

joplin

Flexible datastore migration and seeding for Clojure projects
Clojure
1
star
27

cljmirror

A Clojure Web REPL, based on CodeMirror
CSS
1
star
28

martintrojer.github.com

Martin's Programming Blog
CSS
1
star
29

postgres-bootstrap

Clojure
1
star
30

scheme-python

Hacky Scheme interpreter written in Python
Python
1
star
31

jvm-mode.el

Monitor and manage your JVMs
Emacs Lisp
1
star