HNHacker News
TopNewBestAskShowJobs

Znafon

580 karma · joined April 25, 2017

submissionscomments
Znafon··on Terraform 0.12
Terraform shine when you combine multiple providers, kubectl manages Kube but Terraform helps you integrate K8s with the rest of your infrastructure (monitoring, Sentry,GitHub and GitLab, etc.)

> I find managing Terraform's state to be a significant hurdle Have a look at https://app.terraform.io/signup/account, it's the free version of Terraform Enterprise and it makes managing your state very easy.

>If you were building a configuration mechanism for your system from scratch to allow your users to configure it as code, would you make .a Terraform provider over a command line tool that can apply [--prune] that same configuration?

I would make a Terraform provider, you get plans, modules, the possibility to integrate with other providers easily and creating a new Terraform provider is actually very easy!

Znafon··on PEP 594 – Removing dead batteries from Python's standard library
To be fair, it dates from 1992. I don't think PyPi existed at the time, it's rather impressive the Core team supported this for so long.
Znafon··on PEP 594 – Removing dead batteries from Python's standard library
> Are Python 2 -> 3 migrations for stdlib packages mostly rewrites or mostly tacking on compatibility layers like `from __future__ import unicode_literals`?

Packages in the stdlib don't need compatibility layer since they are always used with the Python version they were written for, it's motly incremental rewrites.

Regarding the build time, I don't think most of the time is spent testing those parts of the stdlib.

Znafon··on PEP 584 – Add + and – operators to the built-in dict class
Yes, Python supports in place operators to avoid this:

    def __iadd__(self, other):
        if isinstance(other, dict):
            self.update(other)
            return self
This would get called for `d += other`.
Znafon··on PEP 584 – Add + and – operators to the built-in dict class
There is a conter proposal to use classmethod like this from another core developer.
Znafon··on PEP 584 – Add + and – operators to the built-in dict class
Thanks, I did not know that.
Znafon··on PEP 584 – Add + and – operators to the built-in dict class
What exactly differs?
Znafon··on PEP 584 – Add + and – operators to the built-in dict class
+ is already non-commutative for list and tuples for example.
Znafon··on Ask HN: Who wants to be hired? (February 2019)
Location: Paris, France Remote: Yes Willing to relocate: Yes Technologies: I do work in C, Python, Go. I work on web backends, API design, as a devops and on data analysis.

My GitHub is https://github.com/remilapeyre

My mail is remi at henki.fr

I'm a data-scientist / do operations research by formation and spent a lot of time on backend (did a lot of work with Python and contributed some features) and infrastructure, notably with Consul, Nomad and Terraform.

I'm a bit proficient in Ruby and JavaScript and with most cloud providers.

I'm looking for opportunities in operations research or other development projects.

I taught some courses on development and cloud at a French university and I'm comfortable mentoring juniors in addition to my tasks.

Znafon··on Road Tripping Around Europe in a Tesla Is Less Fun Than You’d Think
Is there credit card tokenization services from which you can get a token identifying permanently a card without the possibility to make a payment?
Znafon··on Road Tripping Around Europe in a Tesla Is Less Fun Than You’d Think
Where there done by the payment processor like Artemis2 or in house?

I'm asking because I saw a lot of in-house tokenizer with hashes or deterministic encryption that could get reversed in a few seconds by brute force since the space to cover is so small.

Znafon··on Road Tripping Around Europe in a Tesla Is Less Fun Than You’d Think
I dont think so, this would probably go against PCI DSS.
Znafon··on Unprovability comes to machine learning
Isn't it one of the reason limiting the power of static analysis and force us to use dynamic analysis to get certain information about the correctness of our programs ?
Znafon··on You might not need Kubernetes
GP probably references an AWS EC2 machine type: https://aws.amazon.com/fr/ec2/instance-types/
Znafon··on Show HN: Prime number sieve in 31 lines of Python
It is just a slow implementation, the usage of a dictionnary rather than a list is weird and the setup will be long, `get_sentinel` scan the whole list while it should just continue so it multiplies the complexity of the algorithm by n, line 22 scan the remainder of the list while it should just go for the multiples.

Here's a naive implementation I just wrote:

    def crible(n):
        nums = [True] * n
        nums[:1] = [False, False]

        for i, isPrime in enumerate(nums):
            if not isPrime:
                continue
            yield i
            j = 2
            while i*j < len(nums):
                nums[i*j] = False
                j += 1
It is much faster (and is about 10 lines of Python):

    timeit.timeit("list(crible(1000000))", number=1, globals={'crible': crible})
    0.9441672329999165
Znafon··on How We Realized Putting Radium in Everything Was Not the Answer (2013)
Well, it doesn't kill you, just makes you look stupid.
← PreviousPage 6 of 6