IRC channel logs

2021-12-18.log

back to list of logs

***karlosz_ is now known as karlosz
<ArneBab>taw10: do I understand it correctly that you actually map the connections and then check all possible connections to find a setup for which every signal pattern yields a number?
<ArneBab>taw10: I had a hard time actually understanding the code — I wonder how it could be made easier to follow.
<taw10>ArneBab: Yes, it finds the correct key by doing "(find key-ok? (permutations ...))". "key-ok?" just checks that every set of signals yields a real number. segments->digit converts the list of lit-up segments to a number, using SRFI-1 set operations (because you don't know what order they'll come in)
<taw10>The digits->number thing is just to convert (4 3 2 1) to 4321
<ArneBab>taw10: set-operations are a good idea — I used char-sets for that which need a separate conversion-step. I did not see the way to get all permutations — nice idea (and good check for the requirements that brute force is possible)
<ArneBab>taw10: and your idea would be far easier to port to something line mini-kanren than mine
<ArneBab>(that would provide more optimized searching methods)
<taw10>ArneBab: the permutations routine is straight out of SICP. I tried a non brute-force way at first, eliminating connections according to the unique (length) sequences. However that didn't give enough information. I kept that solution in the Git repo (previous commit) just in case
<ArneBab>taw10: I did the solution from known lengths with manual rules, so there are enough information, but I lack an automatic method to generate these results.
<ArneBab>… these rules.
<fnstudio_>hi, in a guile repl, when in debug mode, i know i can press ,q to go back up to the parent environment (probably not the proper name)
<fnstudio_>however, sometimes things get a bit hairy, and you end up a few levels down in a debug wormhole
<fnstudio_>is there a shortcut that brings me back to the main parent, instead of pressing ,q n times?
<taylan>fnstudio_: Ctrl+D might work as well, which is a bit quicker than ",q<ENTER>"
<fnstudio_>taylan: thanks, ouch, Ctrl-D doesn't seem to work here... (in a Geiser REPL, within Emacs)
<ArneBab>taylan: CTRL-D is dangerous. I killed my shell a few times with that because I pressed it twice too often :-)
<taylan>yeah that can happen ^^