freenode/lisp - IRC Chatlog
Search
14:32:03
heisig
Sounds like just a few lines of code. Build an EQUAL hash table of forms, walk all files, populate the table and count their appearance.
14:35:19
heisig
It would reliably detect all duplicate code. Or do you mean similar code? Detecting that would be much harder.
14:37:13
heisig
Then you would need a code walker (e.g., agnostic-lizard) and a metric for similarity.
14:41:52
heisig
Maybe you could use a generic plagiarism checker. It might not be tailored towards CL, but could work reasonably well.
14:48:30
shka_
then go, calculate hashes of direct children operands, multiply with hash of the parent and also put it into filter
14:49:22
shka_
this way you would end up with fixed size data structure that would hold estimate of the whole structure
14:51:53
shka_
base case when you only considering two pieces of code while checking for duplication
21:28:35
fiddlerwoaroof
Yeah, it's a jane street project and so it's probably related to an ocaml codebase
21:43:47
no-defun-allowed
Well, at the moment beach is finalising a paper for ELS and I think there's some discussion about improving the compiler.
21:44:29
no-defun-allowed
You can test it, it only takes about two minutes to compile with low debug settings.
21:48:31
no-defun-allowed
Then you'd need to wire in the compiler and make a code generator too. I don't know how SICL manages that, or if the test environment/REPL goes through Cleavir even.
21:53:55
no-defun-allowed
However, that just goes to a backend which generates more Common Lisp to run on the host from memory.
21:54:30
francogrex
I was surprised to learn that closure cl always seeded itself from a previous image. few are lisp implementations that can be build from the ground up with just an assembler?
21:55:54
verisimilitude
That's how I want to do it. For one, you avoid the malicious compiler attack.
21:56:57
francogrex
computers work with assembly instructions and it is more transparent and clear to know what is going on
21:57:21
verisimilitude
With how I'd do it, there'd be no building at all; you'd have the machine code and that loads the rest of the Common Lisp package and there you have it.