Re: read numbers
Hugo Mills <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Dec 10, 2021 at 06:02:12PM +1300, Richard O'Keefe wrote: > Question 1: > Why is the file written that way in the first place? > With multi-terabyte drives as cheap as they are, you > may not care about bloating the space your data use, > but more characters => more time. Unless I'm very much mistaken, this code is for this year's Advent of Code problems. (https://adventofcode.com/2021/about), so the set-up is somewhat contrived. > Question 2: > Depending on what bit manipulation you want to do, > it may be more convenient to work with integers > rather than binaries. So what exactly do you want > to do with these? It looks like day 3, which involves counting the number of bits set in the nth place of each number (for each n). Hugo. -- Hugo Mills | Great films about cricket: Crease hugo@... carfax.org.uk | http://carfax.org.uk/ | PGP: E2AB1DE4 |