This is certainly possible, but I imagine it's not going to happen except 
as an outside project.

Making a compiler like this isn't exactly easy, either – you'd probably 
have to do a lot of reaching into Julia's C internals to get to the 
type-inferred code.

You're welcome to try this, and I'm sure that you'd be able to find help on 
the mailing list for the trickier parts, but it might be best to wait until 
we have static compilation and link against Julia code as a library – you 
can avoid the run time that way.

– Mike

On Sunday, 11 May 2014 15:43:14 UTC+1, francoi...@gmail.com wrote:
>
> Hi Julia users,
>
> As a newcomer, let me first introduce myself. I have some experience in 
> numeric code, written mostly in Fortran 2008, C++, C#, Delphi and 
> Mathematica. As a consultant, I have to write some numerical codes but 
> those need to be written in languages that are different from clients to 
> clients. Most of the time, the code can't be linked to any open source 
> library for licensing (or management) reasons. Therefore, I need to rewrite 
> some basic codes in a lot of different languages. Bug fixed in one language 
> are a pain to fix in another one.
>
> Therefore, it would be nice to have a unified language for prototyping. 
> Julia seems to be an amazing candidate for different reasons :
> - Execution speed in the same order as compiled languages
> - I love the type system and the multiple dispatch idea
> - The language is quite close to all the above languages when it comes to 
> number crunching
> - Its reflection capabilities
>
> As Julia code can be manipulated by Julia, I am wondering if translating 
> Julia code to any of those language could be mostly automated. With 
> Mathematica, it is quite easy to generate code from mathematical 
> expressions, which is an extremely powerful way of preprocessing symbolic 
> expressions before the big number crunching.
>
> I am thinking of a Julia function that takes as input :
> - A Julia function that use only function whose concrete output types can 
> be inferred from their concrete input types
> - Some concrete types
> - A language : Fortran, C, C#, Delphi
> and output some code in that language.
>
> Even if this process can't be completely automated, it there a way to make 
> have a code "helping" at the translation ?
>
> Best regards to all of you,
> François
>
>

Reply via email to