https://github.com/dmjio/julio
Julia embedded in Haskell
https://github.com/dmjio/julio
haskell julia
Last synced: 10 months ago
JSON representation
Julia embedded in Haskell
- Host: GitHub
- URL: https://github.com/dmjio/julio
- Owner: dmjio
- License: bsd-3-clause
- Created: 2018-11-08T04:46:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-14T01:02:29.000Z (about 1 year ago)
- Last Synced: 2025-03-27T21:23:14.313Z (10 months ago)
- Topics: haskell, julia
- Language: Nix
- Homepage:
- Size: 6.84 KB
- Stars: 53
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
Julio
=====================
An example of [Julia](https://julialang.org/) embedded in [Haskell](https://haskell.org).
Per the instructions on Julia's website [on embedding](https://docs.julialang.org/en/v0.6.2/manual/embedding/).
## DSL
```haskell
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Julia
main :: IO ()
main = do
juliaInit
evalJulia "print(sqrt(2.0))"
exitJulia
```
## Build
```bash
nix-build
```
## Run
```haskell
-- [nix-shell:~/Desktop/julio]$ ./result/bin/main
-- 1.4142135623730951
```
## Reference
> ["Julio, get the stretch"](https://www.youtube.com/watch?v=eb3hoJ-CLJ8)
- Bruno Mars