News for hackers. Stuff that matters.

berbc

> __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?

Re:This is how I git on Tuesday November 10, 2020 @06:37AM (#25044827)
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.

Re:Async Python is not faster on Friday June 12, 2020 @05:30AM (#23497522)
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.

Re:Fast Perfect Hashing on Thursday February 14, 2019 @05:04AM (#19160802)
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

Re:Why Don't Computer Scientists Learn Math? on Saturday November 19, 2016 @10:51AM (#12993962)
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.
Re:Mosh: the mobile shell on Monday September 05, 2016 @08:12AM (#12429721)
His presentation "Transport Architectures for an Evolving Internet" could be the one you're referring to? It's online and very interesting: https://www.youtube.com/watch?v=UsCOVF0vDe8.
Re:Guess my word on Saturday September 05, 2015 @04:56PM (#10176021)
"My word is after noon."
Re:BIER – Berlin’s no-brand beer on Sunday May 03, 2015 @11:03AM (#9481525)
What if other people come up with their own bier and they use the same no-brand branding?
Re:JSFuck – esoteric JavaScript on Sunday May 03, 2015 @04:40AM (#9480514)
Why? I believe you have more sophisticated ways of obfuscating code. Those tricks seem to be easy to reverse.
Re:Docker orchestration on Monday February 09, 2015 @12:16PM (#9022285)
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.
Re:Idris: Type safe printf [video] on Sunday December 28, 2014 @04:32AM (#8805850)
Re:Leaving Academia (2013) on Friday December 05, 2014 @05:59AM (#8703836)
> 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.

Re:Learn You an Agda on Tuesday December 02, 2014 @06:40PM (#8690878)
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.