You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: julia/README.md
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ julia> evaluate(raw"sum $ for i. exp [log 2.0, log 4.0].i")
16
16
## `DexModule` run a whole bunch of Dex code defining a module.
17
17
Similar to `evaluate`, `DexModule` takes a string full of Dex code and runs it.
18
18
However, DexModule is a bit more powerful.
19
-
It allowed you to run multiple expressions, and returns a namespaced module object that you can query to get variables out from.
19
+
It allows you to run multiple expressions, and returns a namespaced module object that you can query to get variables out from.
20
20
21
21
22
22
```julia
@@ -77,8 +77,8 @@ Int32
77
77
78
78
It is not presently possible to `juliaize`/`dexize` arrays (but you can use them / get them as the input/output of `NativeFunction`s, see below).
79
79
80
-
You can also use [`convert`](https://docs.julialang.org/en/v1/manual/conversion-and-promotion/#Conversion) to convert between `Atom`sand Julia objects.
81
-
When converting to a Julia typeit will make the minimal change from the Dex type to get to the type you requested.
80
+
You can also use [`convert`](https://docs.julialang.org/en/v1/manual/conversion-and-promotion/#Conversion) to convert between `Atom`s and Julia objects.
81
+
When converting to a Julia type it will make the minimal change from the Dex type to get to the type you requested.
**Performance Note:** at present, when passing multidimensional arrays to or from a `NativeFunction`they are copied.
111
-
This is due to Dex using C memory layout, and Julia's default `Array`using Fortran memory layout.
110
+
**Performance Note:** at present, passing multidimensional arrays to or from a `NativeFunction`copies them.
111
+
This is due to Dex using the C memory layout, while Julia's default `Array`uses the Fortran memory layout.
112
112
We hope to address this in future versions.
113
113
114
-
## `dex_func` compile Dex code directly into a function you can call from julia.
114
+
## `dex_func` compile Dex code directly into a function you can call from Julia.
115
115
116
-
The `dex_func`[string macro](https://docs.julialang.org/en/v1/manual/metaprogramming/#Non-Standard-String-Literals) allows you to define a function in Dex that you can then call from julia.
116
+
The `dex_func`[string macro](https://docs.julialang.org/en/v1/manual/metaprogramming/#Non-Standard-String-Literals) allows you to define a function in Dex that you can then call from Julia.
117
117
The function type it defines is a `NativeFunction` as described above.
118
118
In functionality, `dex_func` is very similar to `NativeFunction ∘ evaluate` except that it does a whole ton of the work at parse time -- including compiling the Dex function.
119
119
120
-
You can use it to define either named functions.
121
-
Both in long form:
120
+
You can use it to define named functions in long form:
0 commit comments