24,628 karma · joined Oct 21, 2019 (7y ago) · 5,512 submissions
https://www.bitecode.dev/
Email: contact at bitecode.dev
comment 6y ago · link · parent
But there is a reason we have a word for config.
It's a specific kind of input: it feeds the boostrapping state of your program, it's not the main data your program process.
The difference is important: structure, complexity and dynamism requirements are not the same.
comment 6y ago · link · parent
If you are provisioning servers from a TOML files, you're doing it wrong. That's your program main input, not config.
If you have deeply nested values, chances are you are again confusing configuration vs main input.
JSON and CSV are great main input formats.
TOML is a great configuration format.
YAML and XML try to do both, and end up doing average on either, but being abused for all of them (looking at you Ansible and Solr).
So you should use each format for the correct purpose, as usual.
A config file looks like ~/.ssh/config or /etc/nginx/nginx.conf, not like ~/.ssh/authorized_keys or /etc/nginx/site-available/default.conf.
Just because we love to put a lot of data input in config folders (.config and /etc are full of input data) and call that configuration doesn't make it so.
How to know if something is configuration and something is input?
Conf data is usually only manually edited (authorized_keys changes with the life cycle of the program) and doesn't contain logic (default.conf if full of logic). Conf is also how the program is going to behave when performing its main task, the boostraping state, not the data used for it's main task (so not ip for provisioning servers, which is not meta, but the main course, or default.conf, which nginx uses to perform the main task). Conf rarely changes, main input often does. Conf is not piped or redirected to stdin.
comment 6y ago · link · parent
I didn't chose this architecture. But I was tasked to package it so that people could just "apt get install stuff" and start using it.
It was HARD.
The tech is very old school, it doesn't give a lot of feedback, it's hard to debug, documentation is sparse and examples in the wild are not up to date, not to mention the state of tooling. And you do all that with shell scripting, the worst language for the job. Sure you can use anything else, if you like zero doc and example.
Then we had to distribute it.
Well, turns out creating an APT repo is not so easy, either.
Now, we did all that by cutting a lot of corners, zero red tape, and only us to please. Also, the consequences of not using best practices, or worst, breaking something, were few.
On a team of 6, only 2 were really understanding what was going on. The rest were lost, awaiting instructions from us because they just couldn't picture were their work would fit in this blob of bash workflow. Now that I'm gone, I have no idea how the team is going to maintain the thing.
I can't imagine doing the same thing with the level of road block working for something as sensitive as the official debian repo would bring.
If debian wants more contributors, they have to make this stuff way, way more accessible. And be friendlier with people telling them it's hard.
Every time I raised the topic, somebody came along to say I shouldn't be doing x or y. Or just that I shouldn't be packaging something and just publish it on the debian repo, letting the debian maintainers do the packaging. It's not going to bring me to work with the community if the first taste of it is the demonstration they completely ignore their shortcomings.
And I say that while I've been typing apt commands for a decade now. I'm also french. Debian is, with VLC, Libre Office and Firefox, one of the 4 pillars of FOSS for me.
comment 6y ago · link · parent
In fact, it's already the case with WSGI setups: you may have async nginx on front, multi-process gunicorn behind, and a thread pool for you db connections. And asyncio already provides API for sending tasks to process pools and threads and getting them back as async Future as a convenience. It's turtles all the way down.
Bottom line, async, threads or processes are not silver bullets, and you should use the right tool for the right job.
Just like when Go users realized that spawning goroutines for everything actually didn't work at scale, throwing awaits everywhere is not a magical solution.
Having asyncio at your disposal make some tasks easier, like websockets, crawling your network, etc. It opened the door for new architectures, and maybe new features (live settings, task queues that feeds the results back to you, etc.).
But it's been oversold, as with anything new and shiny.
comment 6y ago · link · parent
Conventions for syntax, names, logic, API, structure, vocabulary and so on.
Conventions are by nature arbitrary, influenced by culture, history, social behavior and a whole lot of human weirdness.
Don't try to learn all the conventions first, it comes faster with practice and exposure to it. Solve the problem, then find the conventions you need to apply the solution in your context.
The beginners paradox is that they need to learn a bit of specific conventions (E.G: part of a language, one paradigm and a few libs) to start working on solving a problem, so it's a frustrating experience.
There is no easy way to build the rest of the conventions based on your knowledge of what you know now, because it's artificial.
It's also what leads people to say "don't learn languages, learn to program". Which makes no sense to you at all, until, well, you finally know how to program. But you got there by learning conventions on the way.
comment 6y ago · link · parent
I tried to prove you wrong and run multiple tests that all shown you were right. Then I tried to run them on different python versions, down to Python 2.7, expecting that my knowledge was just dated.
No, I was just wrong.
Don't know why I was so convinced of this.
> Regarding docstrings you can access the underlying function via the __wrapped__ attribute,
This assumes one knows about that. A lot of people never even heard of partial(), and won't know about _ _wrapped_ _. Not to mention I never seen a tool using help() fetching _ _wrapped_ _._ _doc_ _ if it exists.
> and signature forwarding is too brittle and magical for stdlib.
@functools.wraps() does signature forwarding to great success, and is in the stdlib.
Nevertheless, I don't think it would be the right strategy for partial(), because you don't have the exact same signature. But at least having something like:
This function is the result of x() being wrapped with partial(x, 1, foo='bar').
Here is the original docstring of x():
....comment 6y ago · link · parent
But I think what they did with partial should be in the stdlib.
In fact partial should also be rewritten in C et promoted to built in.
Right now it's 10 times slower than lambda, and you have to know about and wish to import functools, yet still loose the docstring.
Shame for such a great feature.
comment 6y ago · link · parent
Assessing said legitimity is tricky. Not because people lie, up to now they have been pretty decent, but because you really don't want to be tracked while following potentially child pron links, so it may take time.
Scaling moderation could become a problem if 0bin becomes more mainstream, but with so few reports, it's not a problem right now.
comment 6y ago · link · parent
Which is why we implemented the delete feature (creating a paste gives you a cookie that allows deletion) recently because we don't want to spend time on customer service for a free site.
comment 6y ago · link · parent
This allowed us to discover we were pretty popular on the crypto community and in specific fan fic subreddits. Which lead us to implement btc tipping and reader mode.
We also got reports, tickets, dmca, etc.
We cannot brute force our thousands of paste encrypted payloads, but for a sample, it's easy to follow the bread crumbs. And if we do it, others do it too.
comment 6y ago · link · parent
They really should not. It's a can of worms. We can get compromised. Bought. Receive a court order (we comply with dmca). Or they could be on the wrong URL (typo squatting, phishing...).
Don't trust random online services with your data. FOSS or not, the code we serve can only be trusted as far as you and I we can be. And you don't know us. And you will make mistakes.
Now I'm guilty of it too, I share passwords with 0bin sometimes. But at least it's my service, I can assess the level of threat.
comment 6y ago · link · parent
Sure, on HN, you will find sometimes some people that reports using it on real life projects.
But in the last 10 years, I did missions for about a 50 or so companies, and none of their team members, NONE, used TDD.
Few even had tests at all.
I've seen companies tried many things: agile, remote work, one team by micro-services, etc.
I've seen many videos of people saying they applied on TDD in their companies. I've even seen a few IRL of them in conferences or meet up.
But I've never worked with people using TDD in real life.
Not saying it doesn't happen, or that TDD is bad, just saying that I don't think it ever became a popular approach. Like Haskell or Nix, it's famous only in our bubble.