| 10:43 |
feedbot |
http://thetarpit.org/2021/on-the-tangled-ball-of-music-that-is-rock << The Tar Pit -- On the tangled ball of music that is rock |
| |
~ 3 hours 8 minutes ~ |
| 13:52 |
feedbot |
http://btc.info.gf/blog/benvulpes-base58-encoding-in-common-lisp.html << btcinfo -- ben_vulpes base58 encoding in Common Lisp |
| |
~ 40 minutes ~ |
| 14:33 |
verisimilitude |
That code's horrible; I could do better, and will try to do so later today. |
| 14:35 |
shinohai |
verisimilitude: I like to archive things I have used, for good or bad, and sometimes even refer back to 'em as reminders of what did and did not work. |
| 14:37 |
shinohai |
As is, it served purpose well for experimenting with addy generation is lisp, though as of yet have nothing concrete out of it. |
| |
~ 5 hours 22 minutes ~ |
| 19:59 |
verisimilitude |
I believe I'm finished. |
| 19:59 |
verisimilitude |
I made some missteps in trying to simplify it, particularly in the second loop, but that's of little importance. |
| 20:00 |
verisimilitude |
It's fine if I submit it inline, right? |
| 20:07 |
verisimilitude |
Without paying much attention, I've yet to come across a test case for which the third loop does anything. |
| |
~ 27 minutes ~ |
| 20:34 |
shinohai |
verisimilitude: will read, though would personally prefer a paste for readability's sake. |
| |
~ 36 minutes ~ |
| 21:11 |
verisimilitude |
Fine. |
| 21:14 |
verisimilitude |
I'll leave this up for a few days or so: http://verisimilitudes.net/base58 |
| |
↖ ↖ |
| |
~ 1 hours 14 minutes ~ |
| 22:28 |
trinque |
it'd be more interesting to explain why yours is better |
| 22:28 |
verisimilitude |
It's not obvious? |
| 22:29 |
trinque |
do I need to explain to you how communication works too? |
| 22:29 |
verisimilitude |
I know that's obviously not so. |
| 22:31 |
verisimilitude |
For one, by using WITH-OUTPUT-TO-STRING, the stream is certainly closed. |
| 22:32 |
verisimilitude |
I avoid interning symbols; use DPB to build an integer, which is its purpose; and in general take advantage of every relevant language feature available. |
| 22:32 |
trinque |
sometimes even discussions of the obvious are illuminating for the logs |
| 22:33 |
verisimilitude |
I didn't bother writing code which avoids all unnecessary allocation, but he has two calls to REVERSE, both unnecessary. |
| 22:33 |
trinque |
yeah, seems this should really both eat and shit streams |
| 22:33 |
verisimilitude |
That's true; it's not submitted here, after all. |
| 22:34 |
verisimilitude |
A more efficient approach would be to determine the string size, and allocate it at once. |
| 22:34 |
trinque |
yep, also a good approach |
| 22:35 |
verisimilitude |
Anyway, were I to write this better, I'd actually read the base 58 documents, rather than merely mimick. |
| |
~ 1 hours 13 minutes ~ |
| 23:48 |
verisimilitude |
How unfortunate; my solution diverges in one other way; it returns the empty string on zero, whereas the original returns "1". |
| 23:49 |
verisimilitude |
I'm not certain which this is a bug in. |
| 23:51 |
verisimilitude |
If I remove the final loop from the original, the result is the empty string; for some odd reason, this seems to me for now to be the only case where that loop does anything. |
| 23:52 |
verisimilitude |
I won't be making any more changes, since my plan is to discard the code later, anyway. |
| |
↖ |