Closed ghost closed 3 years ago
By default Julia displays the struct with all its fields. It's possible however to overwrite that method to specify the output.
I see that you're interested in this project and your post about it the previous issue looks great. Are you interested in doing pull requests as well?
For this particular case one needs to define s show method for example: https://stackoverflow.com/a/57885705/2501747
I don't really have any coding skills, apart from html, css and some very basic php. And I had never heard of Julia before I found this. So I can't contribute to the code unfortunately.
Happy to help with testing though. :-)
Do you mind testing it?
] add Enigma#feature-improved-output
Thanks in advance
That's wonderful!!
julia> enigmas = run_cracking(bombe; log=false)
1 Enigma machine(s):
- III, II, I | 24 24 1 | UKW: B | AB CD EF GH IJ KL MN OP QR ST
Exactly what is needed. Great work!
The only other suggestion would be to do the same in other places. Like here:
julia> set_rotors!(enigma, 4,2,1)
(Enigma.Rotor("IV", 1, [5, 19, 15, 22, 16, 26, 10, 1, 25, 17 … 14, 6, 20, 7, 11, 4, 3, 13, 23, 2], [8, 26, 23, 22, 1, 18, 20, 14, 12, 7 … 10, 13, 2, 19, 11, 4, 25, 15, 9, 6], 1, 11), Enigma.Rotor("II", 2, [1, 10, 4, 11, 19, 9, 18, 21, 24, 2 … 17, 7, 26, 14, 16, 25, 6, 22, 15, 5], [1, 10, 16, 3, 26, 23, 18, 12, 6, 2 … 17, 7, 5, 14, 8, 24, 13, 9, 22, 19], 1, 6), Enigma.Rotor("I", 3, [5, 11, 13, 6, 12, 7, 4, 17, 22, 26 … 24, 21, 19, 16, 1, 9, 2, 18, 3, 10], [21, 23, 25, 7, 1, 4, 6, 16, 22, 26 … 8, 24, 19, 12, 18, 9, 14, 17, 15, 10], 1, 18))
But the one you have done is by far the most important. Thank you.
This should be fixed now. Sorry for the long delay of publishing the new version.
Currently when your program finds a result it displays:
I don't understand what all this means. Would it be possible to give it in a friendlier way, such as that shown by Cryptool:
III, V, I / 25, 3, 7 / BL CK DG FP IR MO QW ST UZ VY / GBU