News for hackers. Stuff that matters.

emnudge

Show HN: I vibecoded a language server for web assembly

https://github.com/EmNudge/wat-lsp

Hey!First was just a test to see if I could. Then became a pretty fun test on iteration loops. How little I could be involved and what kind of instruction works best.It's a language server for WAT, the webassembly text format. There are not many of these that exist in general, so it's very easy for this to claim the #1 spot.It's a problem that has some clear correctness criteria so putting it...

( Read More... | no comments | on HN )
Outside of making something - it’s very useful for setting up a quick project.

Stackblitz did this with Node (aka their Web Containers).

You could make a new project very quickly and prototype an idea. When finished, download it off the browser and deploy it.

It’s to connect phone numbers to identities. Getting a physical sim in China involves going in person to a store where they keep your passport and a mugshot (you hold a paper with your number on it) in a database.

There’s no free WiFi without requiring a phone number. It allows the government to connect internet users to real identities.

Re:"Comedy is search" – theory on how jokes work on Tuesday October 01, 2024 @06:56AM (#41706756)
This is a very interesting way of putting it.

The way I’ve explained it is “unserious surprise” which also fits with this.

https://emnudge.dev/blog/a-grand-theory-of-humor/

Having things "just work" can be really appealing. I once had an issue where my Linux distro of choice was having a tough time with my monitor orientation. I got quite a few linux gurus involved and none could figure it out. I'm sure it eventually would have worked, but that's not an experience I'm particularly fond of.

And then software that does exist will often have bugs for Linux that are overlooked due to how small the market is.

Re:Show HN: Term Typer – Learn a Language by Typing on Tuesday April 16, 2024 @07:05PM (#40058398)
German would be helpful for me
Re: on Sunday April 14, 2024 @11:22AM (#40031757)
Hey, HN!

I get onboarded to new projects sometimes with a bunch of local unstructured logs already set up. They come from different parts of the application at different layers - many without syntax highlighting. It's hard to make sense of things.

In contrast, something like your browser's dev console allows filtering, highlighting, and inspection of "unstructured" logs. I wanted something like that for any kind of terminal output.

There are some tools with a similar goal. I hope to make considerable UX improvements over those. I have a custom query language, a command palette, automatic syntax highlighting over unstructured code, and some basic chunking heuristics to combine certain logs if they're close together. It's the combination of the view and the search features that I think really makes it a helpful tool.

Hey, HN!

Whenever I'm onboarded onto new codebases, I have a tough time finding my own debug logs when there are hundreds of logs from different systems all cluttering the terminal. It's hard to know where one log ends and another begins. It's just white text on a black background.

I started this a couple days ago, but it's already been useful for my work. After building it, I found out projects like this had already existed. There's a section on bottom of the readme comparing them.

Re:The Reddits on Thursday March 21, 2024 @12:01PM (#39780330)
I'm pretty sure he knows what Doordash is. I assume the thing that doesn't exist is ordering via a phone line, not an internet-based interface.

i.e. texting or calling a number in a specific way based on some standard tons of fast food places provide to make fast food orders without human interaction.

Re:Netlify just sent me a $104K bill for a simple static site on Tuesday February 27, 2024 @01:58AM (#39520947)
My previous understanding was that service would be stopped once you hit past the free tier.

Upon review, it does not look like this is the case. I have several very low traffic projects on which would have never been anywhere close to the free limit. However, if I get involved in a random spam attack, it seems I could be on the hook for several thousand dollars.

This is incredibly dangerous. Netlify is often used as a beginner friendly free tier for static hosting. Not as something that is cheap, but as something that is free. This is just an overall dangerous position to put people in.

Re:WASM Instructions on Sunday February 18, 2024 @02:26PM (#39422206)
If we’re doing self promo, I’ve got something similar but significantly smaller in scope:

https://github.com/EmNudge/watlings

Re:WebAssembly Playground on Monday February 05, 2024 @02:37AM (#39258334)
I sunk a decent amount of time into WebAssembly over the past few months (I am the author of "watlings").

From my understanding, there are 3 answers here.

1. Most spaces do not need WASM. You don't necessarily see speed improvements since usually your JS and WASM (in the browser) are compiled into the same thing.

2. WASM is very good at bringing tools to new spaces. The biggest limitation here is in both tooling and education. It is not trivial to compile something like FFMPEG for the browser. Improvements to the WASI standard are helping here.

3. WASM is starting to see use in different spaces. For example, as a containerization format for efficient sandboxing.

Re:Learn WebAssembly by writing small programs on Tuesday September 05, 2023 @11:34PM (#37401049)
That looks super useful! I wish I knew about this when first learning wat. This would make a great reference!
Re:Learn WebAssembly by writing small programs on Tuesday September 05, 2023 @09:21PM (#37400240)
I really like Exercism! Unfortunately their exercise model is considerably more free-form where it teaches you considerably less and in much larger chunks. I think this is a great model for certain contexts, but the format I have in the repo is more similar to "rustlings" and "ziglings" where you're taught syntax and features alongside the code examples.

I don't know that their Wasm module is necessarily "broken", so I'm unsure whether my contributions would be welcome.

Re:Learn WebAssembly by writing small programs on Tuesday September 05, 2023 @02:05PM (#37395496)
Author here!

My initial motivation to learn WASM (as someone from a primarily web background) was that I had a pretty poor understanding of WASM in general and so I had a lot of difficulty working with WASM builds in just about any capacity other than a heavy JS wrapper.

There are aspects to how WASM works that are quite different from other kinds of assembly formats that make learning the basics pretty important. e.g. how memory is requested, provided, grown. How functions are received and exported. Capabilities of tables.

A lot of this might be abstracted by massive wrappers, but you're losing a lot in perf and debugability when using them.

While I've yet to do it, I've heard of many people using it for peer to peer file transfer. I tend to transfer files between devices pretty often and have never found a perfect solution. I'd like to do the same soon enough once I figure out exactly how to do it.
Actually, it supports regex!

I detail this a bit more in the readme, but it supports general JS notation for certain things.

Surround your search with /these/ to perform a regex match on the character. To match on the name instead you can use the advanced search tab which is accessed via the button on the top left.

I may also add glob notation though, since that sounds like a pretty valid use case.

Heyo!

I've only recently dug into the big world of Unicode, but when doing so, I found the tools available sorely lacking. Most were server-side or needed to be downloaded and had confusing interfaces and buggy behavior.

The solution was to build my own. Turns out it's super easy to just download a 1.9MB text file and parse it using JavaScript. The entire application is client-side, so requests are quick and technically work offline.

Right click a symbol to copy it. Left click to open more information about it. Simple Search is the default. Click the button in the upper right to do some more sophisticated filtering with "Advanced Search".

I'll probably make it a PWA once I figure out how to properly do cache busting.

On a different note, I don't know many people who are interested in Unicode lookup tools and/or those who use such tools regularly. I've added in features that I personally found useful, but do let me know if there are killer features you'd like for it to have.

source at https://github.com/EmNudge/unicode-lookup

Re:Hackers hide web skimmer inside a website's CSS on Saturday December 12, 2020 @12:30PM (#25399900)
Quick correction: it is not the same as eval. It does not have access to the current scope. It is technically a fair bit safer when trying to run code from a string.

It may have access to the window object, however, so if something important is there, if can probably mess with that.

A lot of unnecessary hate here. I think many are missing the use case. You use your own favorite and highly customizable text editor? Cool! This might not be for you.

I think this would be a fantastic text editor for anyone new to the terminal. Provides some syntax highlighting, a nice background, line numbers, tabs, and mostly familiar controls without a ton of setup.

I think there are still quite a few improvements I’d love for it to have, but this might be the thing I recommend to anyone first starting out in the terminal who wants a bit of a nicer editor than nano.