/Julio

Julia embedded in Haskell

Primary LanguageNixBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Julio

An example of Julia embedded in Haskell.

Per the instructions on Julia's website on embedding.

DSL

{-# LANGUAGE OverloadedStrings #-}
module Main where

import Julia

main :: IO ()
main = do
  juliaInit
  evalJulia "print(sqrt(2.0))"
  exitJulia

Build

nix-build

Run

-- [nix-shell:~/Desktop/julio]$ ./result/bin/main
-- 1.4142135623730951

Reference

"Julio, get the stretch"

  • Bruno Mars