Stream: git-wasmtime

Topic: wasmtime / issue #4839 improve/document examples in `wasm...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 01 2022 at 10:33):

adsick opened issue #4839:

Hi, I just came from https://github.com/bytecodealliance/cranelift-jit-demo which is nice, document and pretty straightforward (although has some todo comments left there 3-4 years ago)

Improvement

Add more examples of different complexity (basic to medium and maybe some complex ones), document them with explanations of what's what (like it is done in cranelift-jit-demo)

Implementation

Think of some simple examples and use-cases that incorporate jit, it could be something like compiled regex or other type of state machine pattern, then add examples commenting every jit and cranelift-specific step to avoid confusion and provide guidance.

Show how to define functions, work with data, leave useful notes to external resources (at least to Wikipedia).

Benefit

Newcomers like me will be able to understand what is going on there and how they can use cranelift jit to build their own blazingly fast & feature packed language.

p.s. now I'm trying to explore cranelift-jit-demo and it is looking good so far, I like it.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 01 2022 at 16:39):

jameysharp commented on issue #4839:

I had considered hooking up my experimental regex compiler (https://github.com/jameysharp/pikevm) to cranelift-jit for fun, but I hadn't really thought about making it be useful documentation. Thanks for the suggestion!

I'm curious: what project do you want to use a JIT compiler in?

One way you can help is by keeping notes on things that you find confusing or surprising about Cranelift as you work on your project. We can help turn those notes into better documentation, or even better, fix Cranelift to be easier to use.

Also, I encourage you to join the #cranelift stream at https://bytecodealliance.zulipchat.com/. There are a bunch of people hanging out there who can help answer questions.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 01 2022 at 18:30):

adsick commented on issue #4839:

Thanks for the response!

what project do you want to use a JIT compiler in?

Probably building a programming language of my own (at least trying my best) but for now just learning more stuff from it to become a bit more experienced. The reason I want JIT compiled language is that I like prototyping and iteration, but interpreted languages are not as fast to be useful in areas like gamedev or heavy simulations so I'm going to use JIT. In the past I've tried Julia programming language and found that is really nice but the problem is that it has GC so gamedev is basically no go (also it is a math-oriented functional language so some things are not so convenient as in e.g. Rust where you have "normal" mutability)

btw currently I'm working on a note-taking app called mem, it can be used to create notes, todos, readlists, dictionaries... but notably it will allow for creating "QA" cards so you can save questions you (or someone else) have to answer later.

Also, I encourage you to join the #cranelift stream at https://bytecodealliance.zulipchat.com/

thanks for that suggestion, not exactly sure if I'm gonna be there, but if I need some help I know where to go.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 02 2022 at 09:53):

adsick edited issue #4839:

Hi, I just came from https://github.com/bytecodealliance/cranelift-jit-demo which is nice, documented and pretty straightforward (although has some todo comments left there 3-4 years ago)

Improvement

Add more examples of different complexity (basic to medium and maybe some complex ones), document them with explanations of what's what (like it is done in cranelift-jit-demo)

Implementation

Think of some simple examples and use-cases that incorporate jit, it could be something like compiled regex or other type of state machine pattern, then add examples commenting every jit and cranelift-specific step to avoid confusion and provide guidance.

Show how to define functions, work with data, leave useful notes to external resources (at least to Wikipedia).

Benefit

Newcomers like me will be able to understand what is going on there and how they can use cranelift jit to build their own blazingly fast & feature packed language.

p.s. now I'm trying to explore cranelift-jit-demo and it is looking good so far, I like it.


Last updated: Nov 22 2024 at 16:03 UTC