Profile

Cover photo
Bram Cohen
Works at BitTorrent, Inc.
Attended SUNY Buffalo
Lives in Marin, CA
13,603 followers|52,187 views
AboutPostsPhotosYouTube

Stream

Bram Cohen

commented on a video on YouTube.
Shared publicly  - 
 
Some interesting facts about this puzzle:

The idea for this puzzle is from me. It predates the idea for the Gear Cube by several years.

This puzzle is unique in that it literally has no core. The Void Cube has a core but it's well hidden. In this puzzle the gearing is an inherent part of keeping it working and holding it together.

As you point out, this is an extremely difficult puzzle, because it has more pieces move per turn than practically anything else. Also because the numbers 4 and 8 appear all over in it, which tends to make things difficult since sequences which move things by 2 aren't all that helpful.
21
Bram Aho's profile photo
 
oh look, another Bram.
Add a comment...

Bram Cohen

commented on a video on YouTube.
Shared publicly  - 
 
In a hilarious example of what happens when you solve a puzzle on paper, I figured out the exact same solution as you did, but for the second step I calculated how much the rotation should be instead of just flipping the puzzle over to see directly when it's in proper alignment.
5
Ethan D. (Nitro)'s profile photoMatt11111's profile photo
2 comments
 
+Ethan D. ?
Add a comment...

Bram Cohen

commented on a video on YouTube.
Shared publicly  - 
 
Make a bigger one with the puzzle to be to pack it into a 4x4x4 space
8
1
Douglas Parrish's profile photo
Add a comment...

Bram Cohen

Shared publicly  - 
 
How to get your code to work on both Python3 and Python2.

I recently got my code to run under both Python3 and Python2. Since I make a lot of use of strings and bytes, which is the hardest transition between the two, you might find my experience helpful.

First, repeat after me:

import sys
if sys.version_info[0] < 3:
import _builtin_
_builtin_.bytes = lambda x: str(bytearray(x))

That makes calls to bytes() act reasonably close to the bytes constructor in Python3, by making unencoded strings when passed an array of ints.

After that's done, the main problem is that using mybytes[i] returns an int in Python3 and a str in Python2. To make that work, replace all calls to mybytes[i] with ord(mybytes[i:i+1]). Yeah it's funny-looking, but it always works.

(I'm assuming that your code uses encode() and decode() properly. If your code started in Python2 and Python3 starts barfing at you about calling decode() on a bytes or encode() on a str, you probably have a bug.)

The above will result in calls to type() not really working on bytes. Maybe you could make bytes be a subclass of str if you need that functionality. I don't, so I haven't worried about it.

Also, if you need an OrderedDict, you should use the implementation linked to below.

Other than some minor library reorganization issues, that was all I had to do to get my code fully back-ported. It's surprisingly easy once you know how to handle the subtleties properly.
A drop-in substitute for Py2.7's new collections.OrderedDict that works in Python 2.4-2.6.
41
11
Milan Pužić's profile photoMatthew J. Harmon's profile photoWouter Van Goey's profile photoAkshat Jain's profile photo
12 comments
 
The mutable bytearray is first introduced in 2.6 and 3.0. 2.6 was orchestrated to be released at the same time as 3.0 and contains as much back ported from 3.0 as was deemed possible (similarly 2.7/3.1). Also with 2.6/3.0 you get PEP 3119 support which clearly defines how you can extend a class to make isinstance() and issubclass() work without actually inheriting from such a base class. Incidentally, 2.6 also introduced bytes as an alias for str and byte literals but as documented the alias is primarily designed to be used with isinstance() so the 2to3 converter can tell what you mean in 2.x code. 2.6 also introduces the ability to do "from _future_ import unicode_literals" to make normal string literal notation actually generate unicode values (basically killing 2.x str literal notation).

If you plan to depend on 2.6+ features (e.g., bytearray) for portability, why not just always used "bytes(bytearray())" as that will work right in 2.6+ and 3.0+. And then instead of doing "ord(mybytes[i:i+1])" for "mybytes[i]" you can just do "bytearray(mybytes)[i]" which isn't so funny-looking (or you could just stick with the mutable bytearray instead of switching to the 3.0+ immutable byte string type bytes to begin with).
Add a comment...

Bram Cohen

Shared publicly  - 
 
Facebook wants you to be stupid.

Facebook clamps down on third party UIs for a very basic reason: Those UIs will inevitably enable functionality which they don't want you to have, because it makes other people less comfortable using the system, and they've crippled the web UI in ways which make people on the whole happier.

First and foremost Facebook doesn't want you to be able to see when people view your profile, for the simple reason that you don't want them to be able to know when you look at theirs. Scams frequently claim to deliver this functionality, for the simple reason that it's highly desired and completely unavailable. Granted alternate UIs wouldn't be able to offer this functionality, but it's a deep issue for projects like Diaspora.

Beyond that, Facebook doesn't want people to feel like they can stalk each other. First and foremost there, its chat system doesn't have the ability to record when your friends join and leave. It would be trivial to add such functionality, but it would make people feel like others had too detailed of a historical record of them, even though the information is already there in principle and only limited by the end user's ability to remember it. Likewise, the time of posts is fuzzed out, first to a minute granularity, then to the hour, and finally to the day, and times of likes isn't kept at all. People simply don't want others to be able to track their movements to the minute quite so easily.

Finally, there's the ability to delete posts. Obviously a client-side cache could simply keep all posts you see and remember them, and any custom client would undoubtedly do that, but people like being able to delete posts, for a variety of good reasons, and want others to be forced to use their own frail human memory to get back the content. Likewise you can hide comments that you make from your main feed, so even people who are permissioned to see them will have a harder time noticing them, and relationship status changes, which are impossible to hide, can be 'hidden' in the sense that people aren't actively notified of them.

Does Google+ want you to be stupid? That remains to be seen...
22
5
Tom Behets's profile photoGiuseppe Catalfamo's profile photoBernardo Juanicó (Matt Manson)'s profile photoColin Gan's profile photo
14 comments
Add a comment...

Bram Cohen

Shared publicly  - 
 
Fuck you, Fandango.

I have now used exactly one online coupon deal, using livingsocial, for Fandango, where I got two movie tickets for the price of one. It sent me a code for use on the Fandango web site (which by the way sucks, but that's a different issue) and used it to buy my tickets. Of course it defaults to buying one. I did change it to two, but I might have had to backtrack and redo something in the UI. In any case, I got my confirmation number, showed up at the movie theater, and got... one ticket. Apparently it will perfectly happily let you buy just one ticket using the coupon for two. Of course I was already there and the movie was starting so I had to buy another one.

So let me just say: Fuck you, Fandango!
10
2
Chad Coronato's profile photomaria de fatima guidir's profile photoTakayuki Hoshi's profile photoSterling Ledet's profile photo
9 comments
 
Hi,are you ok?
Add a comment...
Have him in circles
13,603 people
Tim Wilson's profile photo
BHOOT JAYDEEP's profile photo
M Bm's profile photo
JULIEN serbit's profile photo
William Ellerbe's profile photo
Robert Verne's profile photo
Hriday Sikder's profile photo
Luis Samra's profile photo
Adeel Magma's profile photo

Bram Cohen

commented on a video on YouTube.
Shared publicly  - 
 
Why not the pentagonal icositetrahedron?
4
2
Henry Segerman's profile photoJoel Batala Young Jossy's profile photoImmo Rêve's profile photoGwen roberts's profile photo
2 comments
 
Cool
Add a comment...

Bram Cohen

commented on a video on YouTube.
Shared publicly  - 
 
The most interesting thing about the Maltese Cube is that it literally has no core at all: The entire thing is held together holistically by the individual pieces. The Void Cube has a core, it's just cleverly hidden.
6
Add a comment...

Bram Cohen

Shared publicly  - 
9
1
morris cat's profile photoderek stonehammer's profile photo
 
Candy corn!
Add a comment...

Bram Cohen

Shared publicly  - 
 
I'm trying to get my email addresses associated with Google+ properly, and would like to ask if anyone really knows what the options mean before I accidentally delete one of my accounts.

Under 'Account Overview' it lists my email address, and lets me try to add another one. Naturally, I'd like to add my work email address, because that gets most of my mail and that's important for all the implicit adding which G+ does. Unfortunately if I try to add that it complains that that account already has an associated Google account, which sort of makes sense, because my work uses Google Apps, but I'd like my G+ social networking feature to be associated with both of them.

Also under 'Account Overview' there are the options 'Delete profile and social features' and 'Delete account'. I'm guessing 'Delete account' is something I absolutely don't want to do, but have a vague hope that using the delete profile and social from my work account will allow me to add that one to the profile I'm using now, and not implicitly remove all the existing state of other peoples's profiles knowing about the account because they've exchanged email with me.

Does anybody know how this all work, in particular answers to my very concrete questions above? It seems like G+ is getting hurt by the preexisting awfulness of Google's support for multiple accounts, but that's a whole other rant.
1
Stephen Chumley's profile photoJered Floyd's profile photoGregory P. Smith's profile photoPaul Kelly's profile photo
21 comments
 
but yeah i totally feel you on the multiple account thing, very annoying when Im working on my companys Google Site under an app account and posting under my personal account. gets all mixed up... chrome is pretty good with keeping track of which account your using in which tab though
Add a comment...

Bram Cohen

Shared publicly  - 
 
Saw a shared post about 'every random hook-up I've ever had'. Not visible when looking at the person's profile. Apparently G+ lets you easily rebroadcast non-public posts. Oops.
2
Bram Cohen's profile photoTodd Nagengast's profile photoSonya Trejo's profile photosamiullah nayel's profile photo
12 comments
 
fgdg df fdgfgdn ghh
Add a comment...

Bram Cohen

Shared publicly  - 
 
I have a backlog of blog posts to write. Do people want to hear about how Facebook wants you to be stupid, or about how most commentary on valuations is completely chuckleheaded? Both will probably have to wait until I set up a better blog though.
1
Senthil Kumaran's profile photoHector Parra's profile photoJohn Lewis's profile photoTakayuki Hoshi's profile photo
6 comments
 
Looking forward to your blog posts ;)
Add a comment...
People
Have him in circles
13,603 people
Tim Wilson's profile photo
BHOOT JAYDEEP's profile photo
M Bm's profile photo
JULIEN serbit's profile photo
William Ellerbe's profile photo
Robert Verne's profile photo
Hriday Sikder's profile photo
Luis Samra's profile photo
Adeel Magma's profile photo
Work
Occupation
Programmer
Employment
  • BitTorrent, Inc.
    Programmer, present
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Marin, CA
Previously
New York City - Manhattan - San Francisco - Buffalo - Oakland - Berkeley - Seattle - Bellevue - Mill Valley - Novato
Links
YouTube
Other profiles
Contributor to
Story
Tagline
The BitTorrent guy
Introduction
I grew up in Manhattan, where I attended Stuyvesant high school and did fairly well on the math team there. Then I attended SUNY Buffalo and dropped out because school just wasn't for me. I later moved to San Francisco and worked at a bunch of startups you've never heard of which mostly just went under. In 2001 I started working on my own little project called BitTorrent, which grew to be about a third of all internet traffic, which it still is today. In 2005 a company was founded around BitTorrent and raised funding.
Bragging rights
Wrote BitTorrent, have 3 kids
Education
  • SUNY Buffalo
  • Stuyvesant High School
Basic Information
Gender
Male