Better HN
topnewbestaskshowjobs
Log inSign up

BiteCode_dev

24,628 karma · joined Oct 21, 2019 (7y ago) · 5,512 submissions

I write to save you time and effort when dealing with Python:

https://www.bitecode.dev/

Email: contact at bitecode.dev

Submissions

comment 7y ago · link · parent

Rebooting does that by default on android: it always requires your pin. No need to remember to press the x button n times. Just shut it down.

A good habit anyway: you don't want them to be able to poke the ram.

comment 7y ago · link · parent

The problem is not the bugs, it's that it was probably recommended to them as a reliable solution, loosing them hours of work. This can't build trust, especially for such an important part of infrastructure: you'll always wonder when it's going to hit you next.

comment 7y ago · link · parent

Depends what you call dynamic. The way you handle gecko changes the interaction that you can have later for sure, and the geopolitics of the surrounding area. Same for new Reno.

In Fallout 1, the entire Necropolis arc is time dependent, and what you can do in there depends of the time you arrive: the Vault Dweller can save Necropolis from the slaughter by killing the Master before the Lieutenant and before 25 March 2162 but after 110 days have passed.

comment 7y ago · link · parent

Looks amazing. I've been using some hacky vscode setup to do GTD but this seems like exactly what i want. Too bad it's not open source, i would still pay their instance but i would feel better knowing i have an escape hatch if they close.

Will try it anyway.

comment 7y ago · link · parent

It depends of how much control I have over the topic. If:

- I know the topic well. - I understand the domain well. - I can picture the technology, expectations and API well. - I have the mastery of my time and deadline.

Then yes, I do.

E.G: I'm currently making a proposal for a new API in an open source python lib called iohttp.

I have time. I have leeway. I have a good overview of the entire problem. So I can afford thinking about the API first:

https://github.com/aio-libs/aiohttp/issues/4346

Then I will write unit tests. Then I will write the code.

But that's a rare case.

Many times coding involves fiddling, trying things out, writing drafts and snippets until something seems to start to solve what you want.

Other times, you want a quick and dirty script or you have a big system, but you are ok with it to fail from time to time. The cost of testing is then not worth it. You'll be surprised of how well a company can be, and how satisfied customers says they are despite the website showing a 500 once in a while.

And you course, you have limited resources and deadlines. Unit tests are an upfront payment, and you may not be able to afford it. Like it's often the case, this means the total cost of the project will likely be higher, but the initial cost will be in your range of price. And you may very well need that.

One additional things few people talk about is how organizations can make that hard for you. You may be working in orgs where the tooling you need (CI, version system, specific testing lib...) may be refused to you. You may even be working in companies where you cannot get clear information about the domain, but get a vague specs, and the only way to design the software is to ship, see it break, and wait for customers to report to you because otherwise the marketing people don't let you talk to them. I'd say change job, but it's not the point.

At last, you have the problem of the less experienced devs. TDD is hard. It requires years of practice in the field to be done properly because you build a system in a completely abstract way. Dependency injection, inversion of control, mocking and all that stuff you need to make a properly testable system is not intuitive: you learn it on the way. Even harder is the fact you have to use it in your head since your are not coding it, but what wraps it, first. And even more terrible is the fact that baldly implemented, over used and over engineered, design patterns make problem worst, not better.

comment 7y ago · link · parent

Moody is too vague. I'm more interested in measurable symptoms. E.G: teens have menstruations sooner on average, and boys have a fully develop hormonal system later on average than boomers. They have more adhd, are more obeses, have more cases of diabetes, have less confidence in the future or trust in the institutions.

And yes, that all translates to attitude.

comment 7y ago · link · parent

Plus, they lived their entire live in a world with:

- sugar everywhere

- deficit in many important nutriments

- attention depleting tech and env

- boomer culture messages in a post 2000 economy and social climate

- low but continuous stressing life style

- micro doses of thousands of pollutants in food, air and water

I have seen first hand how working those improved my quality of life, and I have not even lived my all life on those conditions.

I find it amazing how resilient they are, considering.

comment 7y ago · link · parent

I just use a MacBook charger and usb-c cable, even if i don't have any apple devices.

The reason is that I move a lot and forget my chargers one or twice a year in a customer office, a hotel or at the airport.

The MacBook pro charger is very expensive, but charges everything I have and I can buy it pretty much everywhere, including at the last minute in an airport.

It's also rated "best cable on the planet" by Nathan K: https://docs.google.com/spreadsheets/d/1vnpEXfo2HCGADdd9G2x9...

Any cable recommended by Benson Leung or Nathan K will do, anyway.

A good compilation of those: https://www.reddit.com/r/GooglePixel/wiki/officialguide/usbc...

comment 7y ago · link · parent

I'm completely ok with it being complicated to design and cost 10 euros more if it delivers.

And despite all its flaws, USBC does. It's small. It's reversible. I can charge all my devices on it: my samsung tablet, my oneplus phone, my logitech mouse, my jabra headphones, my switch and my XPS 13 laptop, which I can also dock to my screen/ethernet. It's amazing.

So yes, I had to take the time to find the proper cable, and I bought a few before finding brands I can trust to work with all my machines... and not fry them.

It sucks, but it will improve with time, like it did with early USB and HDMI (too many people forgot how terrible THAT was). It already has, in fact, improved a lot, and it will keep it up.

Meanwhile, I have only one cable and one dongle in my bag that do everything. I don't even have to get them out most of the time.

This is imperfect. This needs fixing.

But this is better than what we had before. Way better.

comment 7y ago · link · parent

Tactical voting has a field day with almost any strategy. We love playing games with out system.

But my intuition is that this system would lower the incentive to do so by nature, because of the culture it promotes.

comment 7y ago · link · parent

Lobbying is a problem on its own, and should be dealt with anyway, and independently of other changes to the system.

There is no way to preserve democracy when there is a legal path for bribing those in charge of power.

comment 7y ago · link · parent

Isn't already the case though?

If yes, it should not prevent us from tying out term limit, only push us to also add some mechanism to deal with bureaucrats.

comment 7y ago · link · parent

The lottery system has several variants to take that in consideration.

In one of them, everybody votes for x (e.g: 3) people around them. Then you remove the top 10% to avoid people campaigning, and the bottom 10% to avoid psychopathic candidates.

The ones that remain can then register to the lottery.

In some variants, you have limits to the wealth you have, jobs you hold, geographic min and max, number of times you can try, etc.

The lottery concept is not about embracing chaos, but smoothing the odds, playing with the Gauss curve in our favor, limiting the network+money factor and avoiding turning politics into a job.

comment 7y ago · link · parent

The alternative is to write SansI/O code (https://sans-io.readthedocs.io/), so that your program don't have to think about that.

Besides, you don't have to put async/await everywhere: if your code is not performing IO, it completely ignore this concern.

The problem is that most of your code is mixing I/O and non I/O code, and people just don't think about it. E.G: a django website is not just a web server, but has also plenty of calls to the session store, the cache backend, the ORM, etc.

Now you could argue that the compiler/interpreter is supposed to hide the sync/async choice to the code user. Unfortunately, this hides where the concurrency happens, and things have dependencies on each others. Some are exclusive, some must follow each others, some can be parallel but must all finish together at some points, some access concurrent resources...

You must have control over all that, and for that to happen, you can either:

- have guard code around each place you expect concurrency. This is what we do with threads, and it sucks. Locking is hard, and you always miss some race condition because it can switch anywhere. - have implicit but official switch points and silos you must know by heart. This is what gevent does. It's great for small systems, not so much at scale. - have explicit switch points and silos: async/await, promises, go-routine. This is tedious to write, but the dangerous spots are very clear and it forces you to think about concurrency upfront.

The last one is the least worse system we managed to write.

comment 7y ago · link · parent

What's the benefit over the forked SingleFile ?

I use it regularly, and it creates a single pure HTML file with inline medias. Easy to read anywhere.

So appart from the compression gain, why the need for SingleFileZ ?

comment 7y ago · link · parent

Apparently there is an extension: https://addons.mozilla.org/en-US/firefox/addon/page-archive-...

comment 7y ago · link · parent

But not supported by iOS Safari. And APNG not supported by edge. That's why sites like imgur use mp4 videos as an alternative to GIFs.

It's not that a bad deal though, one minute of video is roughly 7Mo for something close to DVD quality. I had GIFS lasting a few seconds weighting way more, with terrible quality.

comment 7y ago · link · parent

Let's say it provides more like a standardized common interface for you. You still have to code the glue to make all those data aggregations, cache handling and permission checks.

In fact, because it's such a new tech, and since it's embedded into very few things, you have a lot to write by hands and perf on single servers will suffer compared to regular SQL + Restish.

The concept is interesting for big distributed heterogeneous systems though, especially when you have many clients.

comment 7y ago · link · parent

I wonder if the people at edgedb (https://edgedb.com/) have the right approach then. They used Postgres as a foundation, and used their experience in SQL to make a DSL that is similarly expressive, but but with less caveats and some helpers for very common use cases.

It's a very young project, and as a heavy ORM using I'm not the best person to judge, but I like the way they think.

comment 7y ago · link · parent

Plus now, the app devs, now all turned devops because talent is scarse and demand is high, get to handle the complexity of concurrency, networking and reliability. This adds to deployment/testing/development setup, and when you change stack or job, the architecture slightly different and you need to learn it all over again.

Funnily enough, we couldn't make the microkernel concept works despite an homogeneous, integrated environment as a basis. But we are fine building frankenstein OS images, hacking multiple graph-shaped systems to make them play together, and call that a success.

Now don't get me wrong, I understand perfectly the benefits of it. But somehow, it feels like we arrived at the right result by the worst possible path, and at a price way higher than it should be.

comment 7y ago · link · parent

I know that in Python, you can do:

    >>> import fractions
    >>> from fractions import Fraction as F
    >>> F(3, 17) * F(12, 5) + F(56, 99)
    Fraction(8324, 8415)
    >>> F(3, 17) * F(12, 5) + F(56, 99) / 3 + 2 * 4
    Fraction(217412, 25245)
However, if you use a float or a complex with it, the fraction get resolved:

    >>> F(217412, 25245) + 0.1
    8.712081600316894
    >>> F(217412, 25245) + 1j
    (8.612081600316895+1j)
You also have some constants:

    >>> import math
    >>> math.pi
    3.141592653589793
    >>> math.e
    2.718281828459045
But they are not just symbol, there is a precision-limited value behind it. Although the value seems to match the precision NASA considers to be enough for trajectories of spacecrafts like Voyager: https://www.jpl.nasa.gov/edu/news/2016/3/16/how-many-decimal...

comment 7y ago · link · parent

In the same boat, and I have heard good things about https://www.dwservice.net/fr/home.html, but I haven't tried it myself yet.
1
180181182183184