Live data from Hacker News

CSS now has an if() conditional function

caniuse.com

181–190 of 245 posts

Re: CSS now has an if() conditional function

#181
post #42

Give it enough time, every declarative language becomes a programming language. This is happening with all config files, markup languages, data formats. The distinction between code, config and data is being erased. Everything is a soup now. Data is application, configuration is code. Code is an intermediate, volatile thing that is generated on the fly and executed in the temporary lambda containers.

An interesting example is the Dhall language: https://dhall-lang.org/

It is a configuration language with general programming features, but it is decidedly _not_ Turing complete. It seems to sit at a sweet spot between "just JSON, no programming convenience at all" and "full-blown programming language with nontrivial toolchain".

Re: CSS now has an if() conditional function

#182
post #42

Give it enough time, every declarative language becomes a programming language. This is happening with all config files, markup languages, data formats. The distinction between code, config and data is being erased. Everything is a soup now. Data is application, configuration is code. Code is an intermediate, volatile thing that is generated on the fly and executed in the temporary lambda containers.

I've been observing this, off and on, for decades now. Is there an actual formal proof or law named after someone at this point?

Re: CSS now has an if() conditional function

#183

Earlier quoted context omitted.

> every declarative language becomes a programming language. Overly pessimistic, lots of non-programming languages remain non-programming languages. Just because one of the most widely used declarative languages start adding conditionals doesn't mean the whole world is turning upside down... > The distinction between code, config and data is being erased. As as lisp programmer, I love it. Get rid of treating things d…

> Just because one of the most widely used declarative languages start adding conditionals doesn't mean the whole world is turning upside down. The question still is: why is CSS becoming a programming language? And who decides on this, anyway?

Becoming? CSS is already Turing-complete (https://stackoverflow.com/a/5239256), even without if() function.

Why? Because of enormous JS bloat. Pure CSS solutions are more performant and backwards-compatible (don't raise exceptions which abort the code).

Who decides? CSS Working Group.

Re: CSS now has an if() conditional function

#184
post #42

Give it enough time, every declarative language becomes a programming language. This is happening with all config files, markup languages, data formats. The distinction between code, config and data is being erased. Everything is a soup now. Data is application, configuration is code. Code is an intermediate, volatile thing that is generated on the fly and executed in the temporary lambda containers.

We can blame von Neumann (et al) and his infernal architecture, where memory stores both instructions and data.

FWIW, you can make software that runs on Harvard architecture chips. They feature distinct address spaces for ROM and RAM. It's been a while, but it's how Atmel/Microchip AVR micros work.

https://en.wikipedia.org/wiki/Harvard_architecture

That said, I'm unaware of any programming language (outside assembler) that takes that split to heart in a higher-level way.

Re: CSS now has an if() conditional function

#185
post #42

Give it enough time, every declarative language becomes a programming language. This is happening with all config files, markup languages, data formats. The distinction between code, config and data is being erased. Everything is a soup now. Data is application, configuration is code. Code is an intermediate, volatile thing that is generated on the fly and executed in the temporary lambda containers.

CSS is already a programming language long before if() function. You can even emulate CPU in it: https://dev.to/janeori/expert-css-the-cpu-hack-4ddj

Re: CSS now has an if() conditional function

#186
post #154

Earlier quoted context omitted.

The legacy version of MSBuild was really bad, but the modern MSBuild project files for .NET are actually quite concise and clean by default?

Only if you are happy with defaults and don't require any build logic. Also you forgot MSBuild is used for everything, not only .NET.

For new .NET SDK style projects you hardly ever need to customize the defaults and I know it's used for more stuff than .NET, but I just wanted to give an example where it actually doesn't suck. Also, you may not need to do everything in MSBuild, for some more complex stuff, you can use something like Cake (https://cakebuild.net/) in .NET for example and skip the programming in XML.

Re: CSS now has an if() conditional function

#187
post #42

Give it enough time, every declarative language becomes a programming language. This is happening with all config files, markup languages, data formats. The distinction between code, config and data is being erased. Everything is a soup now. Data is application, configuration is code. Code is an intermediate, volatile thing that is generated on the fly and executed in the temporary lambda containers.

dont be such a doomer

Re: CSS now has an if() conditional function

#188
post #154

Earlier quoted context omitted.

Only if you are happy with defaults and don't require any build logic. Also you forgot MSBuild is used for everything, not only .NET.

For new .NET SDK style projects you hardly ever need to customize the defaults and I know it's used for more stuff than .NET, but I just wanted to give an example where it actually doesn't suck. Also, you may not need to do everything in MSBuild, for some more complex stuff, you can use something like Cake ( https://cakebuild.net/ ) in .NET for example and skip the programming in XML.

.NET made into my toolbox before it was announced to the world, thanks to be working at a MSFT partner that was selected to be part of the Portuguese launch event for .NET with ready made products.

Never seen any big corp using alternative .NET build tools, rather wrestling MSBuild, or before it came to be, nmake.

Re: CSS now has an if() conditional function

#189

Earlier quoted context omitted.

If only Lisp had better presense in modern code editors. Emacs is not enough, especially on Windows where it is super slow. I think this is what actually stops newcomers to start with Lisp and not Python

I find lisp to be a very non ergonomic language and am happy that python is the default.

Can you quantify that?

Re: CSS now has an if() conditional function

#190

Earlier quoted context omitted.

Horrible. Would’ve been much nicer if they’d reached for Scheme.

You say that, but people in OCaml keep bemoaning the use of mostly declarative s-expressions in the Dune build system. Imagine the reaction if MSBuild used an actual Scheme.

Why doesn't the OCaml build system use OCaml?
Post reply on HN