@penguin42 Kinda has to do that anyway when doing subtraction. If your represented numbers have to be non-negative (with a separate sign flag) then taking 23-19 is awkward.

It's all tricky, and I'm looking for people's intuition, I'd argue the opposite of anyone's suggestion.

I'm ... (significant pause) ... undecided.

@penguin42 It's equivalent is to represent [6,5,2] as [4,4,7,-1], so -256 as 744-1000. It has a logic and consistency, but the implementation might not be as elegant as the concept.

@penguin42 That was my initial thought, but then I considered 2s-complement, which is basically representing -256 as [4,4,7,-1] (IYSWIM).

Hence wondering.

@penguin42 I'm trying to work out how to answer that without "leading the witness" and biasing the results.

Imagine I'm specifying an algorithm, using Python as the "best common language", so using a list in Python is the "natural" way to hold a big_int in an arbitrary base.

Random question. Suppose I'm representing integers base B as lists with the head as least significant term. So using base 10, the number 256 would be:

[ 6, 5, 2 ].

How would you represent -256? For example, would you choose:

[ -6, -5, -2] ??

Or [ 4, 4, 7, -1 ] ??

Or would you carry an extra "sign field"?

Or something else?

Hey, you know what makes posts more accessible?

not writing them in one long run on word salad without any punctuation capitalization or other indication that you are moving from one idea or sentence to another or stopping and pausing for emphasis and differentiating meanings based on such cues

This advice is not only for increased accessibility for users who rely on screen readers. It also helps those who have difficulty with reading and comprehension due to a host of other reasons. Be kind.

Remember to say the right thing in the right place, but also, and more difficult, to leave unsaid the wrong thing at the tempting moment.

@vortex_egg Quite. You see a really good post, you follow, then what follows turns out to be of poor quality. The double coin flip then results in an unfollow, and all is well.

@vortex_egg Lists like these need curating. I tend to be fairly free in following people, and then when I see something "off" I flip a coin twice ... two tails means I unfollow.

It's a stochastic process, and on average it works pretty well. If something is "important" then someone I follow will boost it.

I'll try to stream working on my SAT solver again tomorrow, but I'm switching to YouTube. It was much easier to debug issues there compared to Twitch and I also really like that viewers can skip around while the stream is running. Quite useful when watching someone code IMO.

Show thread

Mastodon is great when you have a local community and network of people who seem to care about keeping it a positive space. I'm going to start following more people who either interacted with me/followed me in the past, or who I see boosted into my TL with positive messages.

To send an envelop containing a shirt from Europe to the US you now have to fill in a huge form, declaring all the customs information and it will cost you up to 20 euros for something they can push in your mailbox.

The international postal system is so freaking broken. I guess we have to close our shop now for international customers as it is not worth letting customers pay around 20 euros for shipping for a shirt we sell for 10 euros.

@penguin42 Arithmetic Coding is really cool, but slightly tricky to implement well. You can think of it as a limiting case of Huffman Coding where you take larger and larger clusters of symbols, but encode progressively.

Interesting stuff.

(But you probably knew that)

CC: @fribbledom

In case anyone is interested, here's a talk I gave a while ago. It's aimed at a general audience, and is on graph 3-colouring, and its connection with NP-completeness.


RT @delaneykingrox
A reminder that your floofy cat's adorable toe beans look like this without fur.

You are welcome.

The advanced reader who skips parts that appear too elementary may miss more than the less advanced reader who skips parts that appear too complex. -- G. Polya

@schratze I know you're (probably) just joking, but far too many people these days call "Fake! Fake!" when it's just the case that they (a) don't understand, and (b) don't want to put in the effort to learn.

CC: @bartholin

No matter how far you push the envelope, it'll still be stationery.

Show older

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!