News for hackers. Stuff that matters.
Re:Show HN: Whack – A simply-designed compiled programming l... by joshumax on Sunday October 28, 2018 @12:37PM (#18321397)
Interesting project! I've written compiler frontends for both GCC and LLVM, and surprisingly found it easier to write one for GCC, despite LLVMs reputation on modularity. I'd love to hear the reasons why you chose LLVM for code generation over something else!
Re:Show HN: Whack – A simply-designed compiled programming l... by thechao on Sunday October 28, 2018 @02:44PM (#18322152)
In my experience, LLVM has too much code motion for understaffed projects to seriously consider. When I’m developing small languages my goal is to reduce overall work or, barring that, keep the work constant & get some other benefit. While I always reach for c++ first, I’m under no delusion that it’s a fit language for describing easily portable, easily consumable, and stable API/ABI. For that work, C is the undisputed grand champion. As such, I generally just translate to C. With the vector intrinsics provided by Clang (or GCC), I can still target all the features I need.
Re:Show HN: Whack – A simply-designed compiled programming l... by sitkack on Sunday October 28, 2018 @04:50PM (#18323100)
I think you would both be well served by targeting WASM or Lua as your next compilation target.
Re:Show HN: Whack – A simply-designed compiled programming l... by thechao on Sunday October 28, 2018 @08:14PM (#18324049)
The halcyon days of high level languages like C are far behind me. These days I target custom ISAs using lovingly hand-crafted machine code. My goal is to write assemblers =)