skysight-inc/HackerNews huggingface dataset:
Show HN: WebAssembly from the Ground Up – learn WASM by building a compiler
Hi HN!

We (pdubroy & marianoguerra) just launched an online book called WebAssembly from the Ground Up. It's an online book to learn Wasm by building a simple compiler in JavaScript.

This is the book we wish we'd had 3 years ago. Unlike many WebAssembly resources that focus on use cases and tooling, we wanted a deep dive into how Wasm actually works.

We focus on the core of WebAssembly: the module format and the instruction set. We think the low-level details — the "virtual ISA" — are the most interesting part, and we had the crazy idea that writing a compiler is the best way to learn it.

Over the course of the book, you'll build up two things:

1. An "assembler library", that can be used to produce WebAssembly modules. Here's an example:

const mod = module([
typesec([functype([], [])]),
funcsec([typeidx(0)]),
exportsec([export_('main', exportdesc.func(0))]),
codesec([code(func([], [instr.end]))]),
]);
return Uint8Array.from(mod.flat(Infinity));

2. A very simple compiler for a language called Wafer, which looks like this:

extern func setPixel(x, y, r, g, b, a);

func draw(width, height, t) {
let y = 0;
while y < height {
let x = 0;
while x < width {
let r = t;
let g = x;
let b = y;
let a = 255;
setPixel(x, y, r, g, b, a);
x := x + 1;
}
y := y + 1;
}
0
}

In case you're not a fan of JavaScript, we've already heard of readers who've worked through the book in F# and Haskell. :-D

You can check out a sample here: https://wasmgroundup.com/book/contents-sample/ — we'd love to hear what you think! There's also a 25% discount for HN readers — just use the code HNWASM25 at checkout.
MP4s with table of contents need nothing except static file serving that can handle range requests, and bandwidth. Sites like Youtube still exist because of their audience.
The intention of the password entry dots isn’t to prevent folks with unrestricted physical access to the machine from exfiltrating information, it’s to stop it from appearing in screenshares and casual “over the shoulder” observations.

Honestly I’m surprised they even acknowledged that as a bug, given there are many ways to get a whole lot more info than what you demonstrated, for instance the builtin “eye” button that is purpose built to reveal the full password to anyone with physical access to the machine wishing to see it.
We tried something similar 17 years ago. We couldn’t achieve true P2P, but we managed to relay a data stream via a server without store-and-forward. The startup was called Pipebytes, and we even got a bit of news coverage: https://www.youtube.com/watch?v=ATqKvra1X3o

It was later sold to another company, which scrapped the P2P part and repurposed it for regular cloud sharing. :(
The longest conveyer belt in the US is moving sand in Texas
You mean logic programming? https://en.wikipedia.org/wiki/Logic_programming

Its been around for decades. In fact this was the first approach to doing AI.

In logic programming you basically write concrete set of test cases and the compiler generates the code for which the test cases hold 'true'.

In other words you get a language to 'precisely and unambiguously describe a program', as you said. Compiler writes the code for you.
How does Brave survive financially?
The problem is not "1080p vs 4K on YouTube" but using YouTube at all for quality video. It's always been bad on YouTube, but videos like this make it extra obvious. For example, this shot: https://i.imgur.com/NRT0AOW.jpeg even in 4K it looks horrible, because of the compression YouTube does even to 4K.

I've tried finding some better version (not on YouTube) but been unable to, maybe it is lost to the passage of time.
Is the Brain's Mind a Computer Program? (1990) [pdf]
The nature of UI as an extension is somewhat hard to understand, since its installation method differs from other extensions. Even core ones. Some extensions autoload, some require INSTALL query, and this one has its own special builtin query. It at least feels more ingrained than other extensions by its user experience.

Then there's the (to me) entirely new feature of an extension providing a HTTP proxy for external web service. This part could have been more prominently explained.

Edit: the OP states that "built-in local UI for DuckDB" and "full-featured local web user interface is available out-of-the-box". These statements make me think this feature comes with the release binary, not that it's an extension.

To clarify my point: for me it's not the possible confusion of what this plugin does or how, but what this collaboration means for the future of DuckDB's no-cost and commercial usage.
> Peak HN.

But, alas, not a single upvote.
Reverse engineering OpenAI code execution to make it run C and JavaScript
For someone jumping back on the local LLM train after having been out for 2 years, what is the current best local web-server solution to host this for myself on a GPU (RTX3080) Linux server? Preferably with support for the multimodal image input and LaTeX rendering on the output..

I don't really care about insanely "full kitchen sink" things that feature 100 plugins to all existing cloud AI services etc. Just running the released models the way they are intended on a web server...
How so? With both users behind symmetrical NAT? TURN does not count as punching holes IMO.
German Thru-Hiker Detained, Deported, and Banned from the US Without a Hearing
Places training LLMs don’t have many people who wear ties.
Customers are leaving in droves and he doesn't have to respond to customers because he is a billionaire oligarch. He can keep wapo around as a propaganda outlet. See also: twitter.

Journalists have more integrity in one pinky than all the oligarchs combined.
Probably, up until they aren't. Are you willing to bet against Google's lawyers feeling daring in the future? As a private individual, I sure aren't, and I don't think I'd bet my (hypothetical) business on it either.
Yeah that's fair, but a lot of people are quite... impatient on IRC, ignoring that those able to answer might be busy or in a different timezone altogether. Debugging an issue requires at the very least the effort to reproduce it, and if the person doesn't already bring a trivial reproduction this can at times be a painful and time-consuming project to extract, and that time is not always available right at that instant.

Coming in with a prepared and easy reproduction and a filed issue makes quite a difference in the response you'll get.

(For the record, I don't experience anything matching what they describe on master right now, but the post was more about PaperWM vs. tiling UX so that doesn't matter that much.)
It seems very silly to write an article like this without a single mention of the fact that CPR is only performed on people who are already dead, so any success rates and complications (eg broken ribs) have to be understood in the context of the alternative to providing care, namely that the person stays dead. This is something that’s been emphasized to me in every CPR class I’ve ever taken, which suggests the author’s research process probably has some room for improvement.
Hi Steve,

I based my assumption on the examples in the documentation[^1]. It is great that we can still use that.

1. https://platform.openai.com/docs/guides/structured-outputs?a...
Experiment with Gemini 2.0 Flash native image generation
Brave is based on Chromium and it still supports manifest v2.

Brave offers everything Firefox does and more --- like privacy by default (which Firefox could but won't do for obvious reasons) --- all without millions in direct Google payola.

https://brave.com/blog/brave-shields-manifest-v3/
AI-hedgehog – a dead simple A.I code assistant that doesn't get in your way
This is a simple code assistant that doesn't get in your way and makes sure you are coding (not losing your ability to program).

You configure a replicate API token from replicate... install the tool and point it at your code base.

When you save a file it asks the LLM for advise and feedback on the file as a "senior developer".

Run this along side your favorite editor to get feedback from an LLM as your working on (open source code nothing you don't want third parties to see).

You are still programming and using your brain but you have some feedback when you save files.

The feedback is less computationally expensive or fraught with difficulty than actually getting code from LLM's so it should work with much less powerful models.

It would be nice if there was a search built in so it could search for useful documentation for you.

Hedgehogs always recommend programming yourself to stay sharp.. so this is A.I assistance in a much simpler offering letting you do all of the work as the developer (how it should be).
I am not sure whether the videos are representative of real life performance or it is a marketing stunt but sure looks impressive. Reminds of the robot arm in Iron Man 1.
Wow that's really cool! Part of my PhD thesis was about writing stable treemapping algorithms for temporal data. The idea being that you want your treemap cells not to fly around like what I'm seeing in your demo, but to remain more or less in the same position without sacrificing too much on the cells aspect ratios. We've come up with a pretty effective and fast method to do that, check out the paper and a demo down below. Maybe we could even do a collaboration to get this implemented in perspective.

https://github.com/EduardoVernier/eduardovernier.github.io/b...

https://youtu.be/Bf-MRxhNMdI?list=PLy5Y4CMtJ7mKaUBrSZ3YgwrFY... (see the GIT method)
How did this ever get through committee?
Also, https://draw.io/
It has great CSV and JSON processing so I find it's almost better thought of as an Excel-like tool vs. a database. Great for running quick analysis and exploratory work. Example: I need to do some reporting mock-ups on Jira data; DuckDB sucks it all in (or queries exports in place), makes it easy to clean, filter, pivot, etc. export to CSV

If you're developing in the data space you should consider your "small data" scenarios (ex: the vast majority of our clients have < 1GB of analytical data; Snowflake, etc. is overkill). Building a DW that exists entirely in a local browser session is possible now; that's a big deal.
Thanks for the link. Have you come across Dennett's multiple drafts model of consciousness, and if so how would you say this compares with that? Scanning the intro section of your link suggests that perhaps Calvin is modelling at a lower-level, but I don't pretend to understand either very deeply.

> Even if it ends up being completely wrong, it’s a beautiful theory

Not just that, but I think it's vitally important to be able to demonstrate how much we can potentially explain. There are some people that will never accept a physicalist model, but I suspect there are many who will happily accept it once they conceive of the possibilities. At least, that's the process I went through when originally learning about evolution by natural selection.
If you appear to succeed- all that is needed is a face of success and connections to others who appear to succeed.
The comment I replied to said this:

> The EU justifies the high membership fees for the rich members by the benefits those rich members get - the poorer EU countries get invested in

Which is just another way of saying "the benefit of paying the fees is that someone else gets them". That's not a benefit and membership fees aren't investments (you don't own anything as a result of paying them).

Same for the rest of this thread. Other countries can align their laws without being given money, and should if those laws are better than their own. It's not a "benefit" to be paying them to fix their own legal systems. Cheap immigrant labour isn't a benefit to the workers in the country, minimum wage laws still apply anyway so the benefits even to rich people are limited, and you don't have to pay foreign countries to attract immigrants from them. They come regardless of what money their government is receiving. In fact big transfer payments make it less likely that they will want to migrate, not more. Finally, countries generally try to be stable locations for investment regardless of EU membership or receiving transfer payments.

> We did. You may not have heard it, but we did.

I don't think anyone did. If they did, then this thread doesn't reflect well on what they must have been saying because not a single argument in it for why fees are a "benefit" make any sense. It's common sense that fees are never a benefit, which is why free trade zones don't normally charge for membership. In fact AFAIK only the EU does that and that's because it's primarily an ideological project that needs huge sums of money for its other goals: free trade is just a carrot-cum-stick used to get countries to go along with it.

> Incorrect. Closest you get is that there's a scheme called the "Blue Card"

The Blue Card is an EU-level scheme with rules set by the Commission, and it only applies to people with "higher professional qualifications" and whose salary is higher than average. Obviously, nobody needs to pay billions in membership fees for the privilege of having random visa scheme imposed on them, any country that wants to can set up such a scheme itself. It's even named after a non-EU document. There is no immigration benefit to being an EU member. If you want to attract lots of migrants from poor EU countries, you can do that easily outside as well.
the way this is worded, is that responibility is bieng downloaded onto "Children under 8", whereas I am absolutely shure that there is no toxin that
effects only children
remarkable how this appears right out in the open
like it's a technical discussion involving the placement of a regulatory warning sticker.
Man I miss those days. I felt so cool sitting in coffee shops with a 10 year old ThinkPad running ratpoison on Gentoo.
Check out AeroSpace. It’s pretty amazing. I’m wondering if it can be made to do things like Niri.

https://github.com/nikitabobko/AeroSpace
It's such a memorable ad. It's like the dream of a child actually brought to life.

I've seen this story discussed around the internet over the last few days and found it interesting how younger generations seemed to only view it negatively (pollution, excess, etc). It's quite sad that something that seems like it could be universally enjoyed at the isn't now.
This is all true, but HFCS-55 is only a little higher in fructose than other sugars considered more healthy like cane sugar[1] and honey[2].

[1] https://kansasfarmfoodconnection.org/spotlights/which-is-bet...

[2] https://en.wikipedia.org/wiki/Fructose#Carbohydrate_content_...
How much larger? Holoviz includes the datashader library for GPU-based rendering, and here is an example with 10 million points: https://examples.holoviz.org/gallery/nyc_taxi/nyc_taxi.html
The cultural divide between mathematics and AI
Tell HN: US Government is surveilling HN
According to Jospeh Cox at 404media [0], who today published leaked documents from an American surveillance-tech company, "ShadowDragon". I thought it may be of interest to HN that "YCombinator" is named [1] as a target.

[0] https://www.404media.co/the-200-sites-an-ice-surveillance-co... ("The 200+ Sites an ICE Surveillance Contractor is Monitoring")

[1] https://docs.google.com/spreadsheets/d/1VyAaJaWCutyJyMiTXuDH...
Some fruits of this project have already landed in some browsers:

* Popovers: https://open-ui.org/components/popover.research.explainer/, https://developer.mozilla.org/en-US/docs/Web/API/Popover_API

* Exclusive accordion: https://open-ui.org/components/accordion.explainer/

* New select, already in Chromium only: https://open-ui.org/components/customizableselect/
Why do they need to diversify? In case they need to pull the plug on Firefox? There is simply no way they could offer anything else as useful as Firefox.

They have enough money that they could throw it all in the S&P 500 and maintain Firefox indefinitely off the growth. That’s what they should do.
I'm tired of this fallacy. Yes this administration does seem to be crashing economy for no good reason but I don't see last time I looked pre election the statistics for number of people with second jobs was low/not out of line with historical percent and I highly doubt that has changed significantly. Wheres your proof that everyone is working 3 jobs?
Isn't the energy return on investment for this extremely low and/or negative? Am I missing something here?
I concur. The US has taken an “anything goes” approach to speech and clearly it hasn’t helped us. In fact, it’s only allowed disinformation to spread.

I mean, Jan 6th is directly the result of an “all speech is equal” approach. Intuitively we know this isn’t how speech works - the town dumbass is probably spewing BS, and the pharmacist might have a point. But when we distill it down to all the same thing and then throw in the immediate and vast nature of the internet, things get hairy.

It’s tough because, of course, nobody wants to let someone else decide who is right and who is wrong. But someone is actually right, and letting everyone decide for themselves isn’t currently working.
Transplanted hearts don’t regulate as well as the original one. They seem to default to a higher resting rate, with less heart rate variability.

So maybe, for a temporary device, it isn’t necessary?
It would make more sense that Google be forced to sell Google Play + Services, not Android.
with the WASM work in DuckDB this is actually a great use-case. For so many workflows you can do everything in a local browser session.
Is there something equivalent or similar for MacOS? This seems great!

I use (and pay) for the magnet app, I don't like the native fullscreen functionality or split screen options.
If someone has ported the server I'll run my own instead of taking the bandwidth.
It's rather sus
> As far as I can tell, people in the past (at least post serfdom) also had greater opportunity to travel in search of greater opportunity.

... Eh, different challenges, really. By the mid-19th century, adult death rates on transatlantic emigrant ships had fallen to a mere 1-3% (~10% for children), with some spikes into double-digits for adults due to disease. It was a one-way voyage; virtually no-one ever returned.
Settling in to a Book
My point is that it's misleading to people who don't have reason to deal in liquid fuels to characterize bunker oil as thick or viscous when it's only thick relative to fuels (which are generally pretty thin, they mostly pour like water) despite not being particularly viscous absolutely.

It's on the same order as most petroleum oils that people deal with and thinner than pretty much every petroleum product that is generally characterized as thick. Thinner grades of motor oil and most hydraulic oil is a bit thinner but thicker grades of motor oil, gear oils, all sorts of greases and tars are all more viscous. Bunker oil doesn't "need" to be heated to be pumped any more than motor oil does though heating it and the accompanying thinning does a lot to help with combustion which is why they do it (and then the rest of the systems that handle it get designed to take advantage of this) and invoking the fact that this is done kind of implies a comparison with the other petroleum products that get heated before being used and in most people's experience this is going to be products used to patch roofs and roads which is unhelpful because those don't even flow except at the highest extreme of naturally occurring temperatures. The only context in which bunker oil is particularly thick is if you're a fuel supplier and spend all day dealing in much less viscous stuff.

I guess it's just pedantry at the end of the day.

And yes, the numbers were timestamp references.
Are there any open source equivalents to the Gemini language action model and embodied reasoning models?
Pain also brings the desire for revenge. So when you use a weapon against someone, don't be surprised when it will be used against you.
You might have no idea how expensive providing great support to customers is when you're an vendor like Apple or a Microsoft. It's like backports, which are even more unbelievably expensive still, and those are gone industry-wide for that reason.

Think of the cost of opportunity in having smart, capable, experienced staff doing support or backports instead of actual dev work. (Especially backports, which when they were done frequently they were done precisely because customers are risk-averse, so a great deal more review and testing (with a much larger test matrix) was required for backports, with attendant huge increase in cost.) That cost is enormous. But of course they do need to provide some support, and at some point some really good support for the really serious bugs, and the vendor will in time do it, but first the customer demand and pressure has to build.
Lumber? Like.... Lumber?

Lumber is organically grown without tending or supervision, fits a generally homogeneous form factor, processed with a small number of tools to produce near-identical mass produced products.

But the essence of the argument is there. Government should be funding open source as necessary infrastructure like roads and bridges.

But not just that. Funding open source is necessary for national defense.

There are hundreds of billions of dollars in budgets out there that should be sent to funding open source developers.
I think it’s not just the security of the platform itself either that’s measurably worse - it’s also way easier to end up with insane security configurations with the hellscape that is Entra. It all just feels like it’s held together with duct tape.

The deep integration with AD (now Entra) was the strongest selling point for Azure, but it’s also by far the biggest issue with the platform IMO.

There’s also just no consistency in the platform - the CLI for instance has totally different flags and names depending on which sub command you’re using. It’s like this everywhere in Azure.
one of the most instructive things about the whole catastrophe is that the US ruling class actually - with a few exceptions - has no morals or values and will not actually intervene to stop "bad" things, even "bad" things happening in obviously "bad" ways.
Mozilla must split their engine and basic browser UI into separate browser, something like Chromium right now, without any "Mozilla" features: no pocket, no AI, no sync, nothing extra that is not necessary to browse the web. This part must forever stay open-source, free, and supported. Only then I'll gladly set up recurring donation. On top of that, they can build a "Mozilla" spin of the browser, with all the bells and whistles they ever wanted: ads, AI, sync, pocket, Mr. Robot promos, etc. This also opens avenue for other companies to build on top of base browser their own improvements, either by using extensions or extension bundles. Even Microsoft might provide their own spin with all Microsoft services and telemetry added.
I see chargers from multiple companies all over now - unlike a decade ago - but they’re allowing other vendors to use them, but that’s not a huge edge to hang that massive P/E off of. Their share price is like they’re early Google or Facebook with very high leverage sales to costs, but that’s just not how the car industry (or anything which makes expensive physical objects) works. They have a good position, although it’s steadily fading, but it’s not a money-printing machine. Electricity is a commodity so there’s an upper bound on profits before competition ramps up.

One of the claims they’ve made is that FSD will change that by allowing them to eat Uber’s business, but that’s years behind schedule and they have nothing approaching Waymo’s experience or safety record, and the self-imposed hardware limitations likely mean that they will never be able to deliver what they sold to many customers. Again, that doesn’t mean they’re bankrupt but I just don’t see a way to justify their stock price on their business fundamentals unless they suddenly get a lot better at making things compared to their competitors.