10 ms·
Extism makes WebAssembly easy
- wikiwong 3y agoA lot of people ask why one would use Extism and how exactly does it help, so I wrote a blog post to explain it detail. I hope it is informative!
- nilslice 3y agoIf the 5x reduction in LOC to execute a wasm function isn't enough, then hopefully the logo just carries us to wasm nirvana :)
- andybak 3y agoAnother open Source project locking their community discussions away on Discord where it can't be easily discovered or searched. At least consider mirroring to the web - or at this stage inform people you will one day make posts available on the open web. Acquiring that consent afterwards is painful.
- ImHereToVote 3y agoI prefer to read documentation via Minecraft chat. That way I can craft a diamond pickaxe to smash my head in.
- pawelduda 3y agoYou can run examples in redstone
- h4x0rr 3y agoIis there any problem with that? Discord is nice to use, free and most people already have it.
- dvngnt_ 3y agocan't view without a phone number at times
- justinclift 3y agoDiscord doesn't seem to need a phone number. Are you thinking of Telegram, which does?
- dvngnt_ 3y agoit depends. if your account gets flagged by some ML algo then they can ask for a number for verfication. it's similar to meta where some flagged accounts have to add an id
- self 3y agoThere are several problems with Discord; see https://mastodon.derg.nz/@anthropy/110922638711307077 https://mastodon.derg.nz/@anthropy/110922638711307077
- andybak 3y ago1. Discord search is very poor 2. Discord will go away one day and so will all the accumulated knowledge 3. People who aren't directly looking for your project won't find it. It's will have no search footprint. You have to actively seek out the Discord to discover that that's activity there. "Most people" don't already have it. Only a fairly specific handful of demographics.
- pests 3y ago> "Most people" don't already have it. Only a fairly specific handful of demographics. This just shows how in-a-bubble people can be. I'm trying to think of a single person outside of my hardcore gamer friends that I know who would have Discord - drawing a blank.
- h4x0rr 3y agoI was talking about "most people" in the IT bubble as well
- troupo 3y agoThe problem is that information in Discord is locked away and is completely inaccessible. As an example. An Elixir library I'm using, Ash, had its support forum on Discord. Just recently they moved it to a proper forum. Here's the immediate result [1]: --- start quote --- Moving to ElixirForum just benefited me. I googled elixir ash registry to understand what it is and if I still need it (I ended up with it from an example somewhere). The top result was this excellent question and answer --- end quote --- A forum is always nicer, and is accessible to more people. [1] https://elixirforum.com/t/ash-community-updates/58515/9 https://elixirforum.com/t/ash-community-updates/58515/9
- nilslice 3y agohear ya loud and clear -- and we use multiple forms of communication.. GitHub issues and discussions are actively suggested when we find that a conversation is turning into something that would benefit others and move from Discord. Discord is really advantageous for us to have real-time conversations with people though.
- esafak 3y agoNote to other maintainers: GitHub does have a nice Q+A feature. Use that, not Discord! https://github.com/features/discussions https://github.com/features/discussions
- justinclift 3y agoNot really a real-time chat replacement thing, so it's not a suitable replacement.
- andybak 3y agoMy point is that people WILL use your Discord as a forum and it WILL accumulate valuable knowledge. This knowledge should be mirrored to the web so it's discoverable and archivable. And to do that you need consent - you should notify users now even if you don't implement it now.
- SkyMarshal 3y agoIs there some service available for mirroring discord chats the web?
- deleted 3y ago[deleted]
- esafak 3y agohttps://www.linen.dev/landing https://www.linen.dev/landing
- SkyMarshal 3y agoLooks excellent, thanks!
- dizhn 3y agoZulip has a read only view available for the web too.
- SkyMarshal 3y agoOh cool, thanks!
- andybak 3y agoI used https://www.answeroverflow.com/ https://www.answeroverflow.com/ which can be self-hosted.
- SkyMarshal 3y agoVery useful, thank you!
- djhworld 3y agoI really miss forums tbh, what happened to them? It feels like Discord has replaced the good old forum but it's worse in so many ways.
- IshKebab 3y agoMost forums were awful phpbb nonsense where it was impossible to find the information you wanted. Search always required logging in and the only interface for very long threads was paging through them 10 badly laid out posts at a time. No thank you. Of course modern forums are better. Disqus is ok, and D's forum software is arguably the best thing to come out of the D project. In any case Discord is not a replacement for forums; it's a replacement for IRC.
- stavros 3y agoUnfortunately, it tries to also be a replacement for forums, with the worst of both worlds (the lack of real time, AND the lack of discoverability).
- bmacho 3y agoNone of the phpBB-like forums that I am aware of (phpBB, SMF, vbulletin) require login to search.
- ipsi 3y agoI recall running into the odd one or two like that - I have vague memories that it was because searching was _slow_ and it didn't take more than a few people using it to bring the site to its knees. Restricting it to logged in users helped, and I think I saw some sites restrict searching to only post bodies for a period too, for similar reasons. I haven't run into it recently, but I have at least vague memories of it happening in the past.
- SkyMarshal 3y agoWhat makes the D-language forums so good? Never used them. (https://forum.dlang.org/ https://forum.dlang.org/)
- treyd 3y agoI've been wanting a bot that would scrape discord conversations into a database and then render them as HTML to be served statically, bash.org-style.
- andybak 3y agohttps://www.answeroverflow.com/ https://www.answeroverflow.com/ roughly does this and can be self-hosted
- segphault 3y agoThe idea of Wasm as a universal plugin system is very promising. But string passing is maybe not the best example to highlight, considering that Wasm is introducing stringref to enable zero-copy string sharing between the Wasm runtime and host language. https://github.com/WebAssembly/stringref/blob/main/proposals/stringref/Overview.md https://github.com/WebAssembly/stringref/blob/main/proposals...
- Deukhoofd 3y agoWhile it'd be a nice addition, I wouldn't expect it any time soon. It's currently still a stage 1 proposal, while we've been waiting for years for other proposals to be merged. The last time a proposal was actually finished was over 2 years ago. https://github.com/WebAssembly/proposals https://github.com/WebAssembly/proposals https://github.com/WebAssembly/proposals/blob/main/finished-proposals.md https://github.com/WebAssembly/proposals/blob/main/finished-...
- vouwfietsman 3y agoIndeed, webassembly is moving extremely slowly. I started a project years ago expecting https://github.com/WebAssembly/memory-control/blob/main/proposals/memory-control/Overview.md https://github.com/WebAssembly/memory-control/blob/main/prop... and https://github.com/WebAssembly/memory64 https://github.com/WebAssembly/memory64 to be fixed at some point. Neither are yet, and the project still suffers from it to this day. I think wasm is still great without these fixes, but I have lost confidence in the idea that wasm will reach its full potential any time soon.
- chrisco255 3y agohttps://github.com/WebAssembly/memory64/blob/main/proposals/memory64/Overview.md#implementation-status https://github.com/WebAssembly/memory64/blob/main/proposals/... For your second one, it looks like it is already implemented in Chromium and Firefox but not Safari. Sadly, it's not new for Apple to be dragging their feet on moving web standards forward. It took what seems like a decade to get proper WebRTC support in Safari.
- yebyen 3y agoThis blog article is great, I had a hell of a time integrating Wasm into Ruby, so much so to the point that I gave up. I was absolutely going to call a function, pass it some HTML to parse (as a string), and return a number, but what I wound up doing is pass a directory with some HTML file in it, return a number as a string, and parse it. Because after struggling with wasmtime and wasmer until I could see it was not going to perform acceptably with a Ruby interpreter packed into the Wasm module, I found that further, it was seemingly impossible to call a function from in Ruby with any meaningful parameters without going through the system interface to the Wasm. https://youtu.be/EsAuJmHYWgI?list=PLbzoR-pLrL6prBc8UnTQ9wI3BvFYp17Xp&t=956 https://youtu.be/EsAuJmHYWgI?list=PLbzoR-pLrL6prBc8UnTQ9wI3B... and https://youtu.be/EsAuJmHYWgI?list=PLbzoR-pLrL6prBc8UnTQ9wI3BvFYp17Xp&t=716 https://youtu.be/EsAuJmHYWgI?list=PLbzoR-pLrL6prBc8UnTQ9wI3B... The article does a much better job of explaining these issues concretely, but if you're totally lost, you can hear my fever-dream version of the same ideas here. (I am a Wasm beginner.) But if you don't have time to watch, tl;dr: I gave up, my Wasm in the end was called as a WASI, which I passed a filesystem context into rather than attempt to call any function at all, and I parsed the output from the system interface. Not too different than what it looks like the Extism example is doing. I will definitely be going through these docs as it seems likely to help me understand better what I've missed, and moreover that it has Ruby support right on the front page chef's kiss
- bhelx 3y agoI've been working on a new Ruby SDK for Extism 1.0 if you want to check it out: https://github.com/extism/ruby-sdk https://github.com/extism/ruby-sdk I added host function support and cleaned up the API a bit.
- bhelx 3y agoThis is great so far btw! Going to watch this whole talk today.
- yebyen 3y agoThere's a lightning talk version from GitOpsCon (at GitOpsCon/CDCon Vancouver - co hosted with OSS Summit later in the week) But they are pretty much the same talk, except at CDCon, I hadn't written the Kubernetes operator so that it actually ran the Wasm module yet. At the end of the talk at OSS Summit, I show it running and I'm so glad you enjoy it! I will definitely check out your new ruby SDK :tada:
- ramesh31 3y agoThis is an ad. Just use WASI.
- xmonkee 3y agoCan you link to a similar example using WASI?
- ramesh31 3y agoTake your pick of runtimes. Wasmtime is the most popular right now. https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md https://github.com/bytecodealliance/wasmtime/blob/main/docs/...
- xmonkee 3y agoThanks. I'm not sure how this maps to the original example, though. This is about compiling a standalone program which translates POSIX apis, it seems? How about calling it from Rust with string args etc?
- brabel 3y agoExactly. That's what Extism is trying to solve. That WASI post doesn't show at all how to use the WASM code from C, or vice versa, because it just compiles the entire C program to WASM which uses the POSIX-based WASI API. If you want an alternative to Extism, you need something like wasmer.io, not just wasmtime (Extism actually uses wasmtime as mentioned in the post).
- ramesh31 3y agoRight. The point being that you can take your pick of WASI compliant runtimes which have those features. Extism isn't something special compared to any other open source project in this domain, yet it smells of a commercial venture. Count me out.
- beepbooptheory 3y agoThis and its relatives feel like such a weird positioning choice for a company. If you have resolved to use some client library to do your heavy lifting, you want one focused and hardened on the specific language you are using, not one library of a dozen libraries spuriously maintained by a startup which will most likely eventually deprecate the library if its not used with their Edge hosting service or whatever. The huge list of languages does not inspire confidence. Like how going to a restaurant where the menu says they have amazing pizza and pho and ice cream makes one think that all three of those items are pretty bad.
- nilslice 3y agothis makes no sense at all
- simonw 3y agoThe thing I want to achieve with WebAssembly is still proving a lot harder than I had anticipated. I want to be able to take strings of untrusted code provided by users and execute them in a safe sandbox. I have all sorts of things I want this for - think custom templates for a web application, custom workflow automation scripts (Zapier-style), running transformations against JSON data. When you're dealing with untrusted code you need a really robust sandbox. WebAssembly really should be that sandbox. I'd like to support Python, JavaScript and maybe other languages too. I want to take a user-provided string of code in one of those languages and execute that in a sandbox with a strict limit on both memory usage and time taken (so I can't be crashed by a "while True" loop). If memory or time limit are exceeded, I want to get an exception which I can catch and return an error message to the user. I've been exploring options for this for quite a while now. The furthest I've got was running Python in wasmtime: https://til.simonwillison.net/webassembly/python-in-a-wasm-sandbox https://til.simonwillison.net/webassembly/python-in-a-wasm-s... and running Pyodide inside of Deno: https://til.simonwillison.net/deno/pyodide-sandbox https://til.simonwillison.net/deno/pyodide-sandbox Surprisingly I've not found a good pattern for running a JavaScript interpreter in a WASM sandbox yet. https://github.com/justjake/quickjs-emscripten https://github.com/justjake/quickjs-emscripten looks promising but I've not found the right recipe to call it from server-side Python or Deno yet. Can Extism help with this? I'm confident I'm not the only person who's looking for a solution here!
- mikewarot 3y ago>When you're dealing with untrusted code you need a really robust sandbox. WebAssembly really should be that sandbox. We shouldn't have to trust any code. WASM is a stepping stone out of the insanity that is ambient authority.
- phickey 3y agoTo run a JavaScript interpreter (spidermonkey, in this case) in Wasm, as well as running that same wasm in a JS engine, you want to look at `jco` https://github.com/bytecodealliance/jco https://github.com/bytecodealliance/jco The component model tooling is getting very close to maturity and will solve many of these problems.
- lisowski 3y agoIf you want to hear more about extism we did an interview with them https://www.devtools.fm/episode/58 https://www.devtools.fm/episode/58
- nilslice 3y agothanks for having us on!