this post was submitted on 27 May 2025
656 points (99.4% liked)

Programmer Humor

23530 readers
1714 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] yetAnotherUser@lemmy.ca 3 points 2 days ago (3 children)

Are those Turing complete? (Legit question, I'd love to know)

[–] frezik@midwest.social 6 points 2 days ago (1 children)

There are scripting extensions to SQL that definitely are. There are some features in some SQL servers that make it Turing Complete even without scripting stuff.

https://stackoverflow.com/questions/900055/is-sql-or-even-tsql-turing-complete

Like HTML5+CSS3 being Turning Complete, it's easy to add features that accidentally make you hit the threshold. Many would argue that it's a sign complexity has run away from you, and I tend to agree.

[–] msage@programming.dev 3 points 2 days ago

I fully support promoting CSS to be Turing complete if I never have to touch JS for the UI elements ever again.

[–] addie@feddit.uk 3 points 2 days ago

Frezik has a good answer for SQL.

In theory, Ansible should be used for creating 'playbooks' listing the packages and configuration files which are present on a server or collection of servers, and then 'playing the playbook' arranges it so that those servers exist and are configured as you specified. You shouldn't really care how that is achieved; it is declarative.

However, in practice it has input, output, loops, conditional branching, and the ability to execute subtasks recursively. (In fact, it can quite difficult to stop people from using those features, since 'declarative' doesn't necessarily come easily to everyone, and it makes for very messy config.) I think those are all the features required for Turing equivalence?

Being able to deploy a whole fleet of servers in a very straightfoward way comes as close to the 'infinite memory' requirement as any programming language can get, although you do need basically infinite money to do that on a cloud service.

[–] barsoap@lemm.ee 2 points 2 days ago

Pure SQL, as in relational algebra, is LOGSPACE/PTIME. Datalog is PTIME-complete when the program ("query") is fixed, EXPTIME-hard otherwise.

It's all quite tractable, but there's definitely turing-complete declerative langugages. Not just pretty much every functional language, but also the likes of prolog.