Coder Social home page Coder Social logo

hyperspherestudio / jdotnet Goto Github PK

View Code? Open in Web Editor NEW
31.0 4.0 6.0 2.6 MB

Julia-.NET Interface Library. Provides Interop between the .NET ecosystem and the Julia programming language

License: MIT License

C# 94.35% HTML 1.42% Batchfile 0.05% Julia 4.18%
csharp interoperability julia net6

jdotnet's People

Contributors

hyperspherestudio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jdotnet's Issues

Cannot run the tests

Hi,

I want to use your library but I can't run the unit tests.
First upon initilization the library couldn't find the julia bin folder. I solved this for now by simply setting _juliaDir in the Julia.cs file like this:
private static string _JuliaDir= @"C:\Users\rreij\AppData\Local\Programs\Julia-1.8.0\bin";
But there has to be a better way. Should I set an environment variable in windows?

Next the initialization halted at the init_mods() method when running the line:
JULIAdotNET = Julia.Eval("JULIAdotNET");
When I open a Juia REPL in visual code and enter using JULIAdotNET I get the error at the end of this message.

I'm using Windows 11 and Julia 1.8.0.
Because I don't have .net 5 I also changed the project to .net 6.

Here's the error code when running using JULIAdotNET :
[ Info: Precompiling JULIAdotNET [6b20c3d1-d1a1-4518-91d2-6d987d94bff0] TESt!! ERROR: LoadError: ccall method definition: argument 2 type doesn't correspond to a C type Stacktrace: [1] top-level scope @ C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\julia\SharpForJulia\NetCore.jl:74 [2] include(mod::Module, _path::String) @ Base .\Base.jl:419 [3] include(x::String) @ JULIAdotNET.Sharp C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\julia\Sharp.jl:1 [4] top-level scope @ C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\julia\Sharp.jl:21 [5] include(mod::Module, _path::String) @ Base .\Base.jl:419 [6] include(x::String) @ JULIAdotNET C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\JULIAdotNET.jl:1 [7] top-level scope @ C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\JULIAdotNET.jl:5 [8] include @ .\Base.jl:419 [inlined] [9] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing) @ Base .\loading.jl:1554 [10] top-level scope @ stdin:1 in expression starting at C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\julia\SharpForJulia\NetCore.jl:1 in expression starting at C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\julia\Sharp.jl:1 in expression starting at C:\Users\rreij\.julia\packages\JULIAdotNET\EITFN\src\JULIAdotNET.jl:1 in expression starting at stdin:1 ERROR: Failed to precompile JULIAdotNET [6b20c3d1-d1a1-4518-91d2-6d987d94bff0] to C:\Users\rreij\.julia\compiled\v1.8\JULIAdotNET\jl_9C01.tmp. Stacktrace: [1] error(s::String) @ Base .\error.jl:35 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool) @ Base .\loading.jl:1705 [3] compilecache @ .\loading.jl:1649 [inlined] [4] _require(pkg::Base.PkgId) @ Base .\loading.jl:1337 [5] _require_prelocked(uuidkey::Base.PkgId) @ Base .\loading.jl:1200 [6] macro expansion @ .\loading.jl:1180 [inlined] [7] macro expansion @ .\lock.jl:223 [inlined] [8] require(into::Module, mod::Symbol) @ Base .\loading.jl:1144 [9] eval @ .\boot.jl:368 [inlined] [10] eval @ .\Base.jl:65 [inlined] [11] repleval(m::Module, code::Expr, #unused#::String) @ VSCodeServer c:\Users\rreij\.vscode\extensions\julialang.language-julia-1.7.10\scripts\packages\VSCodeServer\src\repl.jl:222 [12] (::VSCodeServer.var"#107#109"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})() @ VSCodeServer c:\Users\rreij\.vscode\extensions\julialang.language-julia-1.7.10\scripts\packages\VSCodeServer\src\repl.jl:186 [13] with_logstate(f::Function, logstate::Any) @ Base.CoreLogging .\logging.jl:511 [14] with_logger @ .\logging.jl:623 [inlined] [15] (::VSCodeServer.var"#106#108"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})() @ VSCodeServer c:\Users\rreij\.vscode\extensions\julialang.language-julia-1.7.10\scripts\packages\VSCodeServer\src\repl.jl:187 [16] #invokelatest#2 @ .\essentials.jl:729 [inlined] [17] invokelatest(::Any) @ Base .\essentials.jl:726 [18] macro expansion @ c:\Users\rreij\.vscode\extensions\julialang.language-julia-1.7.10\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined] [19] (::VSCodeServer.var"#61#62")() @ VSCodeServer .\task.jl:484

LoadError on NetCore.jl

The unit tests, and also doing Pkg.precompile() fail with

ERROR: LoadError: ccall method definition: argument 2 type doesn't correspond to a C type
Stacktrace:
  [1] top-level scope
    @ C:\Users\mpinxte1\.julia\packages\JULIAdotNET\7zJUz\src\julia\SharpForJulia\NetCore.jl:74
  [2] include(mod::Module, _path::String)
    @ Base .\Base.jl:419
  [3] include(x::String)
    @ JULIAdotNET.Sharp C:\Users\mpinxte1\.julia\packages\JULIAdotNET\7zJUz\src\julia\Sharp.jl:1
  [4] top-level scope
    @ C:\Users\mpinxte1\.julia\packages\JULIAdotNET\7zJUz\src\julia\Sharp.jl:21

Could this be related to JuliaLang/julia#43953?

Other package with a similar issue: JuliaData/SentinelArrays.jl#69

I'm using Julia 1.8.2

`JuliaOptions` does not seem to be implemented in v2.0.0

Hi and thanks again for your effort. I just started testing this library.

While trying to reproduce you example in the github's frontpage, I could not find how to specify JuliaOptions. Was this renamed ?
Also it seems Julia.Init can only accept an optional string argument.

https://github.com/HyperSphereStudio/JULIA.Net/blob/4d1fbe4360cae909840641bb1f7e0b5537908acb/src/csharp/Julia.cs#L49-L71

Was the example implementation valid only in 1.x.x, or should it still work ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.