Fork me on GitHub
#off-topic
<
2022-01-30
>
Ben Sless08:01:12

anyone remember the name of the way for representing bound arguments as numbers?

teodorlu08:01:02

https://en.m.wikipedia.org/wiki/Value_numbering Is this what you're looking for? You're reminding me of something, but it's way back in my mind.

Ben Sless08:01:07

YES, thank you both 🙂

🙌 1
Martynas Maciulevičius18:01:25

For some reason I don't understand the complete use of this. In particular the "De Bruijn Index". For me it simply looks like a stack-based language code of some kind of expressions where you expect that the "stack" would contain this number of arguments. Is this correct?

emccue18:01:50

can someone ELI5 this?

Ben Sless18:01:48

Canonical representation of code without name collisions

1
teodorlu18:01:35

You don't really need this if you just want to read Lisp code, the evaluate it. But it could enable compiler optimizations that would be harder to implement otherwise.

Martynas Maciulevičius18:01:41

I found that De Brujin graph is an Euler graph and can be used to shrink the source code. But I'm not familiar with the notation they use in wikipedia. It could be De Bruijn notation but even then it's not clear what goes where. So is this also meant to shrink the code some way? i.e. to match for code chunks that are the same?

Martynas Maciulevičius18:01:09

In this vid the guy used the De Bruijn graph for DNA matching. It's basically a regex state machine that encodes a graph. And not any graph, Euler graph: https://www.youtube.com/watch?v=TNYZZKrjCSk

Nom Nom Mousse18:01:25

Yeah, De Bruijn is used a lot in bioinformatics :thumbsup:

Ben Sless18:01:38

It's the only way to "properly" show function/expression equality

1
hiredman20:01:43

Re: de bruijin indices being a weird stack language, there are optimized transformations of lambda terms to ski terms (avoids the term size explosion that the naive transform results in) that requires knowing the de bruijin index of each variable

quoll12:02:00

I’m looking at this before coffee, and it took me a moment, but I just realized… De Bruijin indexing is analogous to skolemizing a logic expression.

quoll12:02:18

(Yes, I know I’m 2 days late here)

quoll12:02:59

Make that “roughly analogous” since variable indices change depending on their relative position

Ben Sless13:02:40

There's probably a logic which shows they're related

emccue15:02:25

@U051N6TTC can I get this on a T shirt “De Bruijin indexing is analogous to skolemizing a logic expression”

🤪 1
Ben Sless15:02:51

Get it in `remorse`

emccue18:01:39

@leif Following up on the Java compiler error messages thing - what universities/organizations would pay someone like me (enough to keep some lights on) to work on this? (Neither of the references panned out, unfortunately. Best I can tell there is no one actively working on this and my best reference is the code itself) It seems working for Oracle or something would be the default way, but there would be no guarantee I could actually work on this and I’d be subject to corporate whims

Martynas Maciulevičius18:01:36

Is this the right chat? What is the topic?

noisesmith18:01:42

I recall it being here in #off-topic since java compiler messages don't come up in clojure dev