Conversation

OK, help me settle a debate.

Is ASN.1 Turing complete?

(Accidentally Turing Complete counts. Proofs of concept are welcome.)

7% Yes, ASN.1 is TC
12% No, ASN.1 isn't TC
14% Schrodinger's cat
16% The gay option
48% The gayer option
9
0
0

@soatok maximum gayness in all things.

I don’t think it is. There’s no branching or flow control that I know of. Maybe there’s some trick in the module import feature that gets you to recursion accidentally. I’m very much not a theorist, though.

What’s the Yes argument?

1
0
0

@soatok oh I see https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-X.680-202102-I!!PDF-E&type=items

In the data structures themselves. Yea I would be very interested in an example of it being Turing complete

1
1
0
@tmaher @soatok does it have generic types? if so i think you can potentially reduce asn.1 into a lambda calculus
1
0
0

@astrid @tmaher It used to have Macro support.

1
0
0

@soatok I had managed to not think about ASN.1 for ages and now I both want to know and also do not under any circumstances want to know.

1
1
1

@soatok

ASN.1 is more like the necronomicon. gazing at it too long or attempting to write an ASN.1 parser will drive you to be incapable of passing a turing test.

0
1
0

@soatok I have spent too much time on thinking through this to win a stupid argument on the internet:
Well technically what I wanted to know is not TC but merely if it is possible to translate ML-KEM's keygen algorithm into ASN.1.

From what I can tell, it is definitely not a regular language, due to the pumping lemma. However, it is extremely hard to get it to compute pretty much anything, so my vote goes to not TC.

2
0
0

@sophieschmieg @soatok i don't know ASN.1 but have you tried to use the pumping lemma for CFGs? if it isn't context-free or regular, chances are it's pretty damn close to TC.

1
0
0

@soatok "Do you mean ASN.1/DER or ASN.1/BER?"

<Questioner catapults into the abyss below the bridge>

[Apologies for the obscure reference]

0
1
0

@soatok The average ASN.1 parser is turning complete by accident (thanks, C).

0
1
0

@soatok @astrid @tmaher every piece of info you drop makes asn.1 a exponentially worse idea

1
1
15

@charlotte @soatok @astrid @tmaher ASN.1 has this weird quantum topological property where it’s simultaneously the worst thing you’ve ever seen and also once you’ve studied it you realize that the only thing worse than ASN.1 is ASN.1.

5
2
1

@novet @soatok the problem is that the pumping lemma works just because there are size prefixed strings. That makes the language not regular, but is pretty useless when trying to do anything interesting with it.

0
0
0

@wordshaper @charlotte @soatok @astrid @tmaher ASN.1 has everything you might want from a data serialization standard except simplicity

1
1
0

@fanf @wordshaper @soatok @astrid @tmaher does it at least have a data model that is better than “this is a number. it has no range or precision. a valid implementation might read this as a float or just as 0. also one of the 3 specs disagrees with itself on what a number even is grammatically”

0
0
5

@wordshaper @charlotte @soatok @astrid @tmaher does this also imply that a strict improvement over using ASN.1 would be to use ASN.1?

1
0
0

@ryanprior @wordshaper @soatok @astrid @tmaher every time you look at it it gets worse, so no

1
0
3

@soatok having worked only casually with ASN.1, my bet is on “yes, accidentally, like Magic: the Gathering”

1
0
0

@0x09 @soatok ... MtG is turing complete?

1
0
0

@charlotte @ryanprior @wordshaper @soatok @astrid @tmaher yeah it's like how you can't undo entropy just by reversing direction

2
0
0

@ferrix @charlotte @ryanprior @soatok @astrid @tmaher the arrow of ASN.1 points only and forever in one direction. In case you were ever curious where the mad god Azathoth danced you can even follow it. (And you thought the A in ASN.1 stood for Abstract. We should be so lucky (but, alas, aren’t))

Management takes no responsibility for the results of following ASN.1 to its logical and inevitable conclusion.

0
1
0

@ferrix @ryanprior @wordshaper @soatok @astrid @tmaher it’s like those old stories of your grandparents where their commute to school was uphill both ways

1
0
2

@charlotte @ferrix @ryanprior @soatok @astrid @tmaher well, y’know, geography was a bit grumpier back in the day.

1
0
0

Since the poll is closed:

The consensus is "No". Which is also what I believe. Happy to be proven wrong, of course.

1
0
0

@soatok
I think ASN.1 is a classic example of mission creep and how the international standards process can fail big-time. The basic encoding rules for ASN.1 are simple and elegant. Everything else is an unusable mess.
(My company implemented an X.400 mail client on the BBC Micro, so I feel I have some standing in this debate.)

1
0
0

@KimSJ I don't think anything the ITU has ever been involved in did not involve complete and utter mission creep.

I am honestly curious if there was ever a something that was X.500 series (what LDAP is a cut down simplified version of) complete.

0
0
0

@soatok ...that does not appear to be the consensus answer from the poll

1
0
0

@cliffle Alan Turing appreciation is the gay option

Alan Turing fanfiction is the gayer option

Neither precludes "Yes" or "No"

1
0
0

@soatok so I guess the question becomes:

Is Alan Turing fan fiction... Turing-complete?

0
1
0