berbc's comments

berbc | 4 years ago | on: Non-technical security best-practices for open source projects

> __attribute__((deprecated)) is evil

I was wondering if anyone had some insight on this?

I understand that deprecating a function usually means you'll be removing it at some point, which goes against the rule "Evolution is addition only", but is it that bad to try to steer users towards a better API, or am I missing something particularly bad about that deprecation attribute?

berbc | 5 years ago | on: This is how I git

As said in one of the YouTube comments for the video you linked here, it's not so much feature branches that are the problem, but long-lived feature branches.

If you want to add a complex feature to a project, you could do it via several branches, one after the other. For instance, the first branch could introduce a feature flag and the second branch implement part of the new feature, and so on.

berbc | 5 years ago | on: Async Python is not faster

Is speed really a good reason for using async? If I remember correctly, asynchronous I/O was introduced to deal with many concurrent clients.

Therefore, I would have liked to see how much memory all those workers use, and how many concurrent connections they can handle.

berbc | 7 years ago | on: Fast Perfect Hashing

As pointed out by some of you, this looks more like permutation of sequences. Also, since a symmetric cipher is used, I'm surprised the author didn't mention Black and Rogaway [1].

Their algorithm is a permutation (int -> int) that works on a domain of any size up to a limit. A typical application for this is encrypting credit card numbers so that the ciphertext still looks like a credit card number (non-trivial because the size of domain isn't a power of two) or efficiently shuffling sequences, randomly in appearance but repeatably if you know the seed.

For instance, this is used by Masscan to randomize the order in which IP addresses and ports are scanned [2]. I've built a Python package that could help you use this algorithm [3] (mostly for fun, but maybe that's useful, let me know :)).

[1]: https://en.wikipedia.org/wiki/Format-preserving_encryption#T... [2]: https://github.com/robertdavidgraham/masscan/blob/6c15edc280... [3]: https://github.com/bbc2/shuffled

berbc | 9 years ago | on: Why Don't Computer Scientists Learn Math?

If by [1..N ⟶ 1..N] you mean the set of functions from [1..N] that have values in [1..N], I think you are wrong. The formula in the post describes a subset, the set of such functions that are surjective.

berbc | 11 years ago | on: Docker orchestration

It's a bit of a basic overview of docker-compose. I would have liked to see how to handle more sophisticated patterns such as the data volume container, and how to manage database initialization, both in development and in production.

berbc | 11 years ago | on: Leaving Academia (2013)

> A career in academia would just require even more proving my worthiness.

I do not think the industry will accept you without you regularly proving your worthiness. Of course, a PhD is something special so I understand anybody would not want that, but not for the reasons given in the article. Same for crazy ideas and being educated. I believe someone could have given roughly the same reasons for "Leaving X" because she's tired of doing the things that X requires. At least we learn about what doing a PhD entitles you to do, but as others have pointed out, this is quite a rude awakening.

berbc | 11 years ago | on: Learn You an Agda

Given formal semantics of your programming language and some time, I think you can use Agda to prove interesting properties about correct programs you write in that language. Semantics, the behaviour of objects such as sockets, can be encoded in types the theorem prover can understand. It can look like this for a basic imperative language: https://github.com/Twey/imp-agda/blob/master/IMP/Semantics/O.... You can then define the property you are interested in and get your proof by combining these types together.

This is often tedious but can be automated to some extent and has already led to significant achievements. See http://sel4.systems, a proven kernel, done with Isabelle, a tool similar to Agda.

Maybe you are looking for a language with a type system that will force you to write your program in a safe way regarding sockets and the like. This can also be achieved with static analysis, another way of automatically proving properties about programs. I do not know of any for distributed programs but it is probably possible. I would say this is still a research topic as such programs are still so hard to get right.

page 1