@hongminhee@hollo.social

I've gotten the urge to try building a JavaScript/TypeScript runtime for learning purposes.

2 quotes

@hongminhee@hollo.social

That JavaScript/TypeScript runtime idea I mentioned has mutated a bit.

Once I actually thought about it, writing another Node.js/Deno/Bun-shaped runtime didn't seem especially useful; there are enough of those already. What I actually want to try is an ahead-of-time JavaScript/TypeScript compiler in roughly the SBCL/Chez Scheme tradition: native code, with a generic implementation always available and specialized versions picked by cheap runtime guards. A failed guard just falls through to code that's already compiled, rather than needing an interpreter or a deopt path. There are probably adjacent projects doing pieces of this, so I won't claim the territory is empty, but I haven't seen this exact shape applied to JavaScript/TypeScript. I've codenamed it Oseo (鼯鼠; flying squirrel in Sino-Korean).

It's still just a compiler experiment, not something I'd call presentable yet, so the repo stays closed for now. Once it works well enough, the first thing I want to try is switching the Fedify CLI, currently built with deno compile, over to Oseo and seeing what breaks. Fedify is the ActivityPub server framework I also maintain, so it should make a reasonably unforgiving first customer. I'll keep picking at Oseo for the next few months and post again when something interesting starts working.

@hongminhee@hackers.pub

갑자기 Common Lisp의 SBCL이나 Scheme의 Chez Scheme 같은 스타일의 JavaScript/TypeScript AOT 컴파일러를 만들어 보고 싶어져서, 일단 프로토타이핑을 해보고 있다. 코드네임은 날다람쥐를 뜻하는 한자어 오서(鼯鼠)[1]에서 따와 Oseo로 지었다. 아마 코드네임 그대로 계속 갈 것 같긴 하지만…

아마 하루아침에 끝나진 못할 것 같고, 몇 개월 끈기 있게 붙잡고 있다 보면 뭐라도 나오지 않을까 싶다.


  1. 鼯鼠】의 「」자는 오직 날다람쥐만을 가리키기 위한 낱자이다. ↩︎

hollo.social

I've gotten the urge to try bu…

I've gotten the urge to try building a JavaScript/TypeScript runtime for learning purposes.