Pinned toot

I made a regex to match all multiples of 7, but it was >10,000 characters so grep couldn't handle it.

Pinned toot

I wanted to write a prime generator, but all the popular languages already have optimised ones I can't compete with.

++[>++<[->>+>+<<<]>>>[-<<<+>>>]<<[->->+<<]>>[-<<+>>]<[[>[->+>+>+<<<]>>>[-<<<+>>>]<[<->[-<->]]<+[<<<[->>+>>+<<<<]>>>>[-<<<<+>>>>]<-]<<->-<]>[->+>+>+<<<]>>>[-<<<+>>>]<[<->[-<->]]<+[<<<[-]<[->+>+<<]>>[-<<+>>]<->>>>-<-]<[-]<<+<[->>+>+<<<]>>>[-<<<+>>>]<<[->->+<<]>>[-<<+>>]<]<[-]>>>>+[<<<<<.>>>>>-]<<<<<+]

commented version: gist.github.com/olligobber/044

I think I need to set up a cat bed next to me laptop's heat vent.

olligobber boosted

Challenge for applied category theory: build a ronavirus, so that the world can be sane again.

olligobber boosted

Who called it a magma and not a hemidemisemigroup?

Political programming memes

Functional Programming Meme

olligobber boosted

Consider the algorithm "M(x): if x<0 return -x, else return M(x-M(x-1))/2". This algorithm terminates for all real x, though this is not so easy to prove. In fact, Peano Arithmetic cannot prove the statement "M(x) terminates for all natural x". Paper to come! Joint work with @jeffgerickson and @alreadydone

Good old futurama...

Can't remember Cory Doctorow's name? Just google "xkcd cape guy"!

olligobber boosted

I swear i didn't arrange this on purpose. They line up to stare at me when they're hungry

Politics/censorship

"Alastair Campbell advocating a return for Labour to its roots in calculus and infinite series" - @TomRivlin@twitter.com

*natural numbers

Concatenation of numbers preserves divisibility, that is if $$a_1,\dots,a_n$$ are all divisible by d, then their concatenation $$a_1a_2\dots a_n$$ is also divisible by d.

"Really excited that YouTube gave me the first 90 seconds of this year's Rewind to explain the volume formulas for higher dimensional spheres." - @3blue1brown@twitter.com

I left this running overnight and it still hasn't output 229.

This version is cheaty:

++.+.++.++.++++.++.++++.++.++++.++++++.++.++++++.++++.++.++++.++++++.++++++.++.++++++.++++.++.++++++.++++.++++++.++++++++.++++.++.++++.++.++++.++++++++++++++.++++.++++++.++.++++++++++.++.++++++.++++++.++++.++++++.++++++.++.++++++++++.++.++++.++.++++++++++++.++++++++++++.++++.++.++++.++++++.++.++++++++++.

I wanted to write a prime generator, but all the popular languages already have optimised ones I can't compete with.

++[>++<[->>+>+<<<]>>>[-<<<+>>>]<<[->->+<<]>>[-<<+>>]<[[>[->+>+>+<<<]>>>[-<<<+>>>]<[<->[-<->]]<+[<<<[->>+>>+<<<<]>>>>[-<<<<+>>>>]<-]<<->-<]>[->+>+>+<<<]>>>[-<<<+>>>]<[<->[-<->]]<+[<<<[-]<[->+>+<<]>>[-<<+>>]<->>>>-<-]<[-]<<+<[->>+>+<<<]>>>[-<<<+>>>]<<[->->+<<]>>[-<<+>>]<]<[-]>>>>+[<<<<<.>>>>>-]<<<<<+]

commented version: gist.github.com/olligobber/044

Now I have a program that sorts a 0-terminated list of bytes.

,[<<[[>>[->+>>+>>+<<<<<]>>>>>[-<<<<<+>>>>>]<<<<[>>-<<[->>-<<]]>>+[<<<<<[->>+<<]+>->+>>>-]<<<<<->>-<+<]>>[-<<+>>]<[-<+>>+<]<<<]>>[>>],]<<[.<<]

Commented version: gist.github.com/olligobber/8c5