3 ms·
You can implement an adder in CSS? Somehow this reminds me of C++ templates. These things seem to gain power and have new features until they become turing-comp
by vardump 11y ago
You can implement an adder in CSS? Somehow this reminds me of C++ templates. These things seem to gain power and have new features until they become turing-complete. And beyond...
- yellowapple 11y agoLanguages of the future will be compiled to CSS in the same way that languages of the present are compiled to Javascript. I get shivers just thinking about all the fun I can have breaking web semantics this way.
- spartanatreyu 11y agoCSS is already turing complete: - http://stackoverflow.com/questions/2497146/is-css-turing-complete http://stackoverflow.com/questions/2497146/is-css-turing-com... This project doesn't use rule 110, it uses LESS which sorts out the logic while compiling and spits out the results in css.
- Dylan16807 11y agoI still say that doesn't count as long as you have to make the user click on all the cells. CSS by itself is capable of doing a single row of rule 110, but that's not enough.
- devsquid 11y agohaha, thats a funny thought. I like CSS. I would love for it to have variables so I could consolidate changes and edit them via JS. Sorta like all the CSS-libraries. o.o am i doing it??
- girvo 11y agoI highly recommend checking out LESS -- even if you ignore all of it's features, being able to define variables alone is worth it :)
- devsquid 11y agoYes i have been meaning too
- robin_reala 11y agoCSS does have variables: http://www.w3.org/TR/css-variables/ http://www.w3.org/TR/css-variables/ Of course, this being the web you’re somewhat limited in browser support: http://caniuse.com/#feat=css-variables http://caniuse.com/#feat=css-variables
- pdkl95 11y agoIt's not really any surprise that templates (or CSS) could be Turing complete, as all the lambda() function does is the same thing a template does - replacing the macros in a template with an argument. This is actually an important lesson that is often missed: if the app you're writing gives the anonymous users any kind of find/replace macro capability, you're giving them a fully Turing complete language (though it's probably not easy, but that rarely stops anyone) and all the potential problems that can bring.