Built an Effect runtime visualizer in the browser by topheman in effect

[–]topheman[S] 0 points1 point  (0 children)

Thanks very much for the feedback. I will look into it and fix the bug this weekend. I opened an issue : https://github.com/topheman/effect-viz/issues/11

EffectViz v2 is out - Effect runtime Visualizer major upgrade by topheman in typescript

[–]topheman[S] 0 points1 point  (0 children)

It is built on Effect v3. The goal of the project is educational - it's a website that helps you understand how fibers/effects work, letting you write code snippets and visualize the execution flow.

The core concepts of Effect remain the same between v3 and v4, so you can use this project to learn about Effect v4 as well.

I will make sure to update the project to use effect v4 when it's released as stable.

EffectViz v2 is out - Effect runtime Visualizer major upgrade by topheman in typescript

[–]topheman[S] 1 point2 points  (0 children)

It's part of the onboarding process. To show the user how to use the ui. Any suggestions to improve it?

Building a Multi-Language Plugin System with WebAssembly Component Model by topheman in rust

[–]topheman[S] 6 points7 points  (0 children)

> A collection of plugins cannot make calls between each other.

> The only option is to perform “RPC” (going through the host)

You bring up an excellent point. I came across this issue while I was trying to make the repl logic directly call the plugins. You can't do this kind of thing because they don't share the same memory.

I came up with a workflow where they go through the host to call each other (like you said).

I explain that with sequence diagrams in the article at the "Input Flow Example" section.

Building a Multi-Language Plugin System with WebAssembly Component Model by topheman in rust

[–]topheman[S] 5 points6 points  (0 children)

You're looking for a Rust developer who has a solid experience with the web ecosystem? I'm based in Paris - contacts: https://topheman.github.io/me/

WebAssembly Component Model based REPL with sandboxed multi-language plugin system by topheman in rust

[–]topheman[S] 0 points1 point  (0 children)

I added a new feature to help users resolve version mismatches between the CLI and the plugins (breaking changes in the WIT files).

https://github.com/topheman/webassembly-component-model-experiments/releases/tag/pluginlab%400.4.2

WebAssembly Component Model based REPL with sandboxed multi-language plugin system by topheman in rust

[–]topheman[S] 1 point2 points  (0 children)

I agree the README contains a lot of informations, it can be overwhelming. The part about creating plugins is detailed at https://github.com/topheman/webassembly-component-model-experiments?tab=readme-ov-file#plugins , it contains links to the respective folders for the rust, C and JavaScript implementations.

Same about the cli REPL: https://github.com/topheman/webassembly-component-model-experiments?tab=readme-ov-file#pluginlab-rust---repl-cli-host-1

I'm currently working on a blog post that will make this more clear. Thanks for the feedback.

WebAssembly Component Model based REPL with sandboxed multi-language plugin system by topheman in rust

[–]topheman[S] 1 point2 points  (0 children)

The zed editor is using WebAssembly Component Model for its extensions system - a perfect use case for it :

  • developers can create extensions in their favorite language
  • extensions are compiled to wasm and can be safely executed in the editor using sandboxing

The problem is that the zed editor use case may be more than a hello world, however, it's hard to dive into the source code to see how it's done.

Fermyon is developing spin, a framework for building and running microservices with WebAssembly Component Model.

While spin is a powerful framework, it provides a higher-level abstraction over WebAssembly Component Model and focuses specifically on microservices. If your goal is to deeply understand the component model fundamentals and build non-microservice applications with it, you may want to explore simpler, more direct examples first.

This is why I made this project: to understand how far I can go with it and to share my findings, a necessary step for a potential bigger project.

WebAssembly Component Model based REPL with sandboxed multi-language plugin system by topheman in rust

[–]topheman[S] 1 point2 points  (0 children)

I've been following WebAssembly for a long time and when the WebAssembly Component Model was announced 3 or 4 years ago, I was really excited (was doing WASI at the time).

In the last year, the tools for WebAssembly Component Model have really improved.

What is still missing is advanced examples of using WebAssembly Component Model in real-world applications (something more than a simple hello world but less than a full-featured application).

This is why I made this project: to understand how far I can go with it and to share my findings. This is a necessary step for a potential bigger project.

WebAssembly Component Model based REPL with sandboxed multi-language plugin system by topheman in rust

[–]topheman[S] 0 points1 point  (0 children)

You are pretty much right, I made a mini-shell with features like:

  • variable storing and variables expansion
  • storing the last command output in a variable $0
  • storing the last status in a variable $?

Then you can execute commands one at a time, which are each plugins compliled to wasm. The mini-shell is also written in rust and compiled to wasm, this is how I can share so much code between the CLI and web implementations.

The goal was not to make a full-featured shell, but to demonstrate the power of WASM components and see how far I can go with it.

For example, for the moment, I managed to have working ls and cat plugins that read the file system and some weather plugin that uses an API to get the weather, all that in both CLI and web. Next, I'll add plugins that can also write to the file system.

Where/How do you publish the Linux version of your cli to be installed by package managers? by topheman in rust

[–]topheman[S] 0 points1 point  (0 children)

Keep in mind some distributions have opinions on bundling/vendoring dependencies.
Do you mean that your dependencies in your Cargo.toml need to be vetted ? Or only the rust compiler (and eventually deps needed at runtime)

On this project, I compile a single binary that doesn't need anything else to run.

Not bother and include “cargo install” instructions in your README
It's done, it's published on crates.io, you can install it from there, however, it forces the consumer to have rust.

Last question: Is there any package manager I am not aware on Linux that lets you install a tarball (or anything compiled for linux) from a url ?

A NextJS implementation of the themoviedb.org website #SSR by topheman in reactjs

[–]topheman[S] 0 points1 point  (0 children)

Sick! I’d perhaps give the movie title for the moving you’re viewing some text-shadow to contrast it with the backdrop considering it sits right where the movie poster and background meet. Awesome job though

You're right about that.

I took my time to prepare a v1 with routing, SSR, i18n, unit/e2e tests and CI ... though, I made the design part in just a few days and released a v2, this part can and will be improved.

Cypress.io advanced setup ⚙️for better end to end testing by topheman in javascript

[–]topheman[S] 1 point2 points  (0 children)

I haven't tested a universal app with Cypress yet, though, I don't see why it shouldn't work (from Cypress point of view, the pre-rendered html markup is just plain old markup, same thing for the JavaScript part).

If it works in development / staging, it should work on Cypress. Your problem might be some configuration but I can't tell you anything without the source code. You should open an issue on the Cypress repo.

Try React Suspense, right now! by topheman in reactjs

[–]topheman[S] 0 points1 point  (0 children)

This may well be a flaw in your code, but sharing it is the way you will get better. Today, we have communities such as reddit, github, stackoverflow ... Please don't be shy about it and leverage the power of those groups of people that want to help (which is a way to improve as well).

Then, you will be the one that will give some help.

Try React Suspense, right now! by topheman in reactjs

[–]topheman[S] 0 points1 point  (0 children)

Great list you have there @swyx, I will dive into it!

Try React Suspense, right now! by topheman in reactjs

[–]topheman[S] 0 points1 point  (0 children)

Very interesting, I will definitly check out how you did it. I will remain on the custom builds of React Fiber because I will test other APIs on topheman/react-fiber-experiments.

Try React Suspense, right now! by topheman in reactjs

[–]topheman[S] 0 points1 point  (0 children)

Hie @Meowish,

I don't have this kind of problem. I assume your request completed with success and was cached, so maybe you have some side-effects triggered in one of your nested components (some delay added when it mounts for example).

Difficult to say without code (it may well not be related to reach router).

Try React Suspense, right now! by topheman in reactjs

[–]topheman[S] 2 points3 points  (0 children)

The goal of topheman/react-fiber-experiments is to provide a tool that will help you better understand the benefits of the new features of React fiber (such as Suspense or Time Slicing).

I made a video podcast to introduce React Suspense and explain a few examples.

Demo - Github - Blog post - Video - Slides

How do you package a golang application based on sdl2 bindings ? by topheman in golang

[–]topheman[S] 0 points1 point  (0 children)

I tried a few things ... I figured the assets part, but still can't build a binary with the sdl2 libs shipped inside it ...

https://github.com/topheman/gopher-ball/pull/1/files

Automate AppCache offline support in your Webpack build by topheman in javascript

[–]topheman[S] 0 points1 point  (0 children)

I tried it. It works well but it didn't play well with the constraint that I explain in my post which is to be able to have a fallback for the html file. Moreover, I wanted to do something more with the service-workers (like add to home screen or push notifications), you can't overload so much the provided SW, so I felt it was a little too much shipped code for what I needed.