Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
certik
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
certik
3y ago
There is old Flang, which motivated me to start LFortran. The new Flang, which presumably you are referring to, started possibly in the same month as LFortran, but we didn't know about each other. It's best if you ask Flang develo
32.
▲
by
certik
3y ago
Turns out Fortran is a great fit for LLM, I am not joking: https://github.com/certik/fastGPT/ .
33.
▲
by
certik
3y ago
Yes, we could make the WASM->x64 standalone. The main motivation is speed of compilation. We do not do any optimizations, but we want to generate the x64 binary as quickly as possible, with the idea that it would be used in Debug mode, f
34.
▲
by
certik
3y ago
My experience with LLVM so far has been that is possible to get maximum speed as long as we generate the correct and clean LLVM IR, and do many of the high level optimizations ourselves. If LLVM has any downsides, it is that it is hard to r
35.
▲
by
certik
3y ago
> I didn’t intend to say that «not official» means «bad». Yes, I know, I understood that. Thank you. I was reacting to the term official, since it is an interesting question what official means for Fortran, since in a way it was "ab
36.
▲
by
certik
3y ago
If you like both Python and Fortran, checkout LPython: https://lpython.org/ , which shares internals with LFortran ( https://lfortran.org/ ), thus delivering exactly the same performance.
37.
▲
by
certik
3y ago
Check out LPython as well (also in alpha): https://lpython.org/
38.
▲
by
certik
3y ago
It's a great question. I think we answered it in one of our initial blog posts when we started LFortran: https://lfortran.org/blog/2019/05/why-to-use-fortran-for-new... Let me know if you have any follow
39.
▲
by
certik
3y ago
A simple example is returning an allocatable array from a function, where the Fortran compiler can decide to allocate on a stack instead, or even inline the function and eliminate completely. While in C the compiler would need to understand
40.
▲
by
certik
3y ago
The original author of LFortran. Great question. We designed LFortran to first "raise" the AST (Abstract Syntax Tree) to ASR (Abstract Semantic Representation). The ASR keeps all the semantics of the original code, but it is other
41.
▲
by
certik
3y ago
I am the original author of LFortran. What kind of comparison would you like to see? If you have any specific questions, I am happy to answer.
42.
▲
by
certik
3y ago
Thanks! I know, LLM came much later after LLVM. But if you are interested in LLM that LFortran can compile, check out: https://github.com/certik/fastGPT/ .
43.
▲
by
certik
3y ago
Very well put. Also a subset of Python: https://lpython.org/ , and it shares the internals with https://lfortran.org/ , both run at the same speed. If you have any feedback, please let us know.
44.
▲
by
certik
3y ago
Yes, I lead the development of these two compilers: https://lpython.org/ https://lfortran.org/ LPython compiles Python at the Fortran speed, since both compilers share the same internals.
45.
▲
by
certik
3y ago
One of the co-founders of the fortran-lang effort. Actually, I would say it is as official as it can be. If you google "fortran", it comes up as first. We provide the home for all of fortran, all of the compilers (commercial and o
46.
▲
by
certik
3y ago
I am one of the co-founders of the fortran-lang effort. I did it while I was at LANL, where I worked as a scientist for almost 9 years. I think the report is overly pessimistic. Here is my full reply on the report: https://fortra
47.
▲
by
certik
3y ago
It doesn't do garbage collection. Variables and arrays get deallocated when they go out of scope (similar to C++ RAII). When you return from a function, it will be a copy, although I think we elide the copy in most cases. We restrict t
48.
▲
by
certik
3y ago
Thank you! Please report all bugs that you find once you try it.
49.
▲
by
certik
3y ago
The direct x86 backend (in fact we have two, one is direct ASR->x86, but it only supports a few things so far; the other one is ASR->WASM->x86, which is a lot more complete and even supports 64bits) seems comparable to LLVM without
50.
▲
by
certik
3y ago
Only if the libraries used the subset of Python that LPython can compile. So currently no.
51.
▲
by
certik
3y ago
By being a superset of Fortran and subset of Python. It turns out the features map on each other almost 1:1, and the differences can be taken care of by the respective frontends, so the abstracted ASR maps perfectly.
52.
▲
by
certik
3y ago
That, but also being simpler and higher level, having multidimensional arrays in the language itself and simpler semantics (such as you cannot just take a pointer to an arbitrary variable, it has to be marked with "target"), no ex
53.
▲
by
certik
3y ago
It's harder to imagine for a Python compiler, so let's just focus on LFortran (since LPython delivers exactly the same performance, due to sharing the middle end and backends). The Fortran compilers traditionally were faster than
54.
▲
by
certik
3y ago
Yes. ASR is as abstract as it can be, but it is still faithful to the original language, no information has been lost, nothing was lowered.
55.
▲
by
certik
3y ago
Yes, I thought about this too. Also LLMs can or will be able to translate from one language to another, so perhaps the fact that LFortran/LPython can translate Fortran/Python to other languages like C++ or Julia might not be usefu
56.
▲
by
certik
3y ago
Yes, we have Shedskin in the list at the bottom of https://lpython.org/ . Note that the Shedskin compiler is written in Python, so the speed of compilation might be lower than other Python compilers written in C++. Unless it
57.
▲
by
certik
3y ago
Thank you for the encouragement. I can answer / clarify your comments: > This is way too similar to Mojo (language) by Modular. At least at some level conceptually. All in a good way. Yes, the main difference is that Mojo is (or wi
58.
▲
by
certik
3y ago
Thank you! I opened up an issue to do this: https://github.com/lcompilers/lpython/issues/2220 .
59.
▲
by
certik
3y ago
See my comment here for all the details regarding implicit typing and why we don't currently do it: https://news.ycombinator.com/item?id=36920963 . But we give you nice error messages if types don't match.
60.
▲
by
certik
3y ago
My understanding from Mojo's plans is that they want to compile all of Python via their compiler (eventually), and then extend Python with extra syntax that will compile to high performance. I think right now they might not compile all
More ›