euddraft icon indicating copy to clipboard operation
euddraft copied to clipboard

RIIR euddraft

Open armoha opened this issue 2 years ago • 6 comments

  • Ergonomic error reporting with chumsky and ariadne crates
  • Responsive and incremental compiler and Language Server Protocol VSCode extension with salsa
  • See how dada lang goes

armoha avatar Jun 02 '22 13:06 armoha

Does it will going on near future or just plan? I'm careful to say this, but, I become hesitant to contributing or read codes of any projects of euddraft because I don't know what will be change or preserved after RIIR euddraft 😭

zuhanit avatar Jul 10 '22 07:07 zuhanit

@zuhanit I'm not going to add any breaking change on eudplib or epScript, as euddraft always has been. (Location id change is major exception. I broke backward compatibility to unify TrgLocation (1~255) and unnatural location index (0~254), to remove one of major confusing learning obstacles for eud beginners. See this article for details: eudplib design mistake (1) EncodeLocation and GetLocationIndex) Updating @phu54321's Roulette project written in 2018 only took 2 major changes to be successfully compiled on latest euddraft, as you can see in phu54321/Roulette@220531commits ((1) CurrentPlayer restoring scheme change and (2) fixing location offset 0x58DC60 to 0x58DC4C. decodeUnitName : CP949 issue has been fixed now.)

I'm more interested in making new language, more high-level, faster and safer than eudplib or epScript, and implementing various compiler optimizations. Porting to Rust could be happen one function at a time. (See this article: https://adventures.michaelfbryan.com/posts/how-to-riir/index.html ) Using PyO3, I can easily write python module in Rust, just like how Cython and pybind11 works in eudplib. So RIIR euddraft could happen gradually and it is not conceptually different from current status ; using Cython, and libepScriptlib.dll and freezeMpq.pyd written in C++.

armoha avatar Jul 10 '22 09:07 armoha

Summary: RIIR euddraft does not mean dropping support on euddraft. That's not what RIIR means. Purpose of RIIR is replacing euddraft's weak points (too low-level and too many footguns, error diagnostics hard to understand, long compile time, large memory footprint proportional to all mpq contents (mainly sound files), no incrementality etc).

armoha avatar Jul 10 '22 10:07 armoha

omg I once imagined complete reimplementation of eudplib/euddraft in Kotlin (It has proper DSL support). IDK much about rust, so looking forward to your contribution

phu54321 avatar Jul 10 '22 16:07 phu54321

Thank you!

zuhanit avatar Jul 11 '22 09:07 zuhanit

Long-term plan: structure eudplib project similar to https://github.com/pyca/cryptography

I'll experiment with eudplib.core.allocator module first: https://github.com/armoha/eudplib/pull/21 It is one of hard working module in eudplib and I expect there'll be major compile time improvement if rewriting is done appropriately.

armoha avatar Dec 10 '23 18:12 armoha