Live data from Hacker News

Show HN: X86CSS – An x86 CPU emulator written in CSS

lyra.horse

81–90 of 99 posts

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#81
post #23

Earlier quoted context omitted.

Can an argument be bade that CSS only exists becuase javascript failed to develop a styling component to displace it? I like to think webassembly is the right track. But ECMAScript and CSS alike need(ed) to devolve into a simpler byte-code like intermediary language syntax. Browsers supporting complex languages has always been a bad idea, what they need to support is capabilities, and access and security primitives.…

> CSS only exists becuase javascript failed to develop a styling component to displace it there is no sortage of projects that do it (especially during the react era, people wanted to get rid of both html and css) but they get pushed down by dogma/inertia mostly. There was iOS constraint layout language ported to js. Seemed pretty cool, but the guy behind it decided to give up and everyone was like welp we tried, did…

It sounds like the consistent pattern is the requirement for browsers to support it. If browsers supported intermediary languages instead, that might be ideal?

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#82

Earlier quoted context omitted.

> essentially just providing a clock "providing a clock" is not something to dismiss though. Arithmetic plus looping will give you a Turing machine, so you do need both or you're just showing the ability to do arithmetic. And a proper Turing machine doesn't need an extra line of template html for each iteration. It's much easier to forgive finite memory, since a small amount of memory can go for billions of years whi…

clock != looping, those examples already loop (dont need a line per iteration), but just dont have a built-in clock and requiring a clock is imo dismissable, because pretty much all modern technology needs a clock too (either from the power grid, or from a hardware component designed for it)

Sure, we can separate loops from clocking for the most part. But it doesn't really change the analysis. These loop. The stuff from several years ago didn't loop properly.

As a tangent though, the system is already powered, you shouldn't need a secondary power source to make your Turing machine go. Something there still feels incomplete, like it probably passes but with an asterisk. But that distinction doesn't matter for CSS since it can self-clock.

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#83
post #65

Earlier quoted context omitted.

I don't know much about CSS, but Turing completeness is notorious for showing up in systems unintentionally. It doesn't take much to be Turing-complete - if a system provides unbounded read/write memory plus branching or conditional recursion you're usually there. As an example, Magic The Gathering (the card game) is Turing-complete: https://arxiv.org/abs/1904.09828 . You can use creature tokens as memory and various…

> Turing completeness is notorious for showing up in systems unintentionally Greenspun's 10th law. https://wiki.c2.com/?GreenspunsTenthRuleOfProgramming

That's on the opposite end of the complexity spectrum.

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#84
post #76

Predictably, all the same people who bemoan JS ubiquity feel the need to express their distaste for advances in CSS in this thread. Nobody is actually doing stuff like this in real applications, it’s just a demo, for fun. I get the feeling some people just hate the web.

Your grumpiness contradicts itself. To the extent that it's just for fun, it's not an advance.

And CSS being Turing complete doesn't make it suitable to replace any JS it couldn't already replace, so why can't JS-haters dislike the idea? If I didn't like a language and people offered an even worse to use replacement I'd be justified in having distaste for it!

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#85
post #3

There is absolutely no reason for css to be turing complete. None. That being said, well done

[dead]

Well, redstone was designed to be able to do logic from the start. The first version had wires, a couple input options, a couple output options, and NOR gates, already updating on a global clock. The ability to make computation circuits was clear.

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#88
post #18

Earlier quoted context omitted.

The complex parts of JavaScript are the semantics, not the syntax. You could reasonably easily spec a bytecode for JS to get rid of the syntax part, but nothing would change in the complexity (almost all modern engines parse to bytecode as the first step and operate on bytecode from then on). If you wanted to implement JS in wasm, you'd either need a bunch of wasm extensions for JS semantics (dynamic object shape, pr…

I admit I don't have depth of knowledge with how JS and Wasm work behind the scenes, but you can already compile JS to wasm. Forgive the ignorance, but what am I missing here? When you compile JS to wasm, aren't the semantics and language behaviors already addressed? My understanding was that things like DOM manipulation APIs would need to be (and are) exposed to the WASM runtime so that the JS-to-WASM compiler could…

You can't currently "compile JS to Wasm", you can compile a JS engine (likely written in C++) to Wasm and run JS inside that (almost certainly at lower speed). So instead of "no more V8", it's closer to "ship V8 as part of the website, instead of part of the browser". Exposing DOM APIs to Wasm is a completely different question, though even those would actually have to be new APIs with a new API design that works for Wasm, since the existing DOM APIs are effectively defined in terms of JS objects being passed around.

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#89
post #73
post #59

Earlier quoted context omitted.

Now we can embed a cryptominer on a page even with JS disabled! /s

Interesting idea. This will be useful only when the CSS communicates with a server. Maybe it can make requests indirectly by setting background image URLs or something and send data piece by piece for each byte. Not sure.

Yes, CSS binary data transfer is possible in bith directions.

Re: Show HN: X86CSS – An x86 CPU emulator written in CSS

#90
post #47

Incredible achievement. Horrible development on CSS front. CSS should NOT be becoming turing complete. Nor any other DSL.

> CSS should NOT be becoming turing complete. Nor any other DSL Hasn't it been so for a while? I mean I agree with you but it's a bit late

It has been a while. This project that implemented logic gates in CSS is 10+ years old:

https://github.com/SLaks/Silon

Linked from here:

https://gwern.net/turing-complete#surprisingly-turing-comple...

Post reply on HN