halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.78k stars 1.07k forks source link

Adaptive Dark colorscheme for Stmt HTML. Ability to programmatically export conceptual stmt files. #8327

Open mcourteaux opened 6 days ago

mcourteaux commented 6 days ago

Colorscheme based on gruvbox-material.

image

Also improved assembly syntax highlighting (while reducing one HTTP fetch, as the highlight rules are now embedded in the generated file.).

mcourteaux commented 6 days ago

I'm not going to reject this, but let the record show that IMHO a light color scheme is preferable to a dark one; is there a way to have this say "prefer the system setting"?

It follows your system preferences. It's one of those CSS media queries. You'll see in the diff.

alexreinking commented 6 days ago

It follows your system preferences. It's one of those CSS media queries. You'll see in the diff.

Can it be made into a checkbox that either enables or disables dark mode? It can use the system preference by default, but I don't want to have to change my whole system preference just to get the page to switch palates.

mcourteaux commented 5 days ago

Can it be made into a checkbox that either enables or disables dark mode?

Fair request; working on it.

mcourteaux commented 5 days ago

Updated: added a toolbar with various settings. Browser persists those settings automatically (no cookie stuff). Color theme can be set to auto, or manual modes. Auto mode also live switches with the system preferences. @alexreinking @steven-johnson See video.

https://github.com/halide/Halide/assets/845012/be572828-5ddc-4f15-842d-9e0577b5029f

@steven-johnson Added those python bindings AFAICT. Not tested that tho. Just a copy-paste-and-modify.

alexreinking commented 5 days ago

Looks great!

mcourteaux commented 4 days ago

@steven-johnson Did this OSX buildbot fail twice on exactly the same test? This thing doesn't seem to fail on other things? It's surprising that this PR would be related but I'm not ruling anything out here. Do you have more knowledge on this failure? Please see #8332 regarding this as well.

steven-johnson commented 4 days ago

@steven-johnson Did this OSX buildbot fail twice on exactly the same test? This thing doesn't seem to fail on other things? It's surprising that this PR would be related but I'm not ruling anything out here. Do you have more knowledge on this failure? Please see #8332 regarding this as well.

Not sure, let's retry again