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 5y ago · link · parent

Yes

comment 5y ago · link · parent

Nice for a prototype,but given model bias, it will create a creativity bubble like the google search bubble but for visuals.

comment 5y ago · link · parent

Because once you have that account, it links all apps data to it, and you give enough data about yourself to be indentified somewhere else even without the account.

comment 5y ago · link · parent

I used android for 5 years without an account. You can side load, use fdroid or apkpure.

comment 5y ago · link · parent

Themarkup.org sure has a lot of anti fb post on HN. I agree with them, but I sense an agenda.

comment 5y ago · link · parent

Nice to have alternatives to malaron, it won't hold forever.

comment 5y ago · link · parent

So I can pretend paying ransom in btc, pocket money from my own company anonymously for a self controled malware, and save on taxes ? Damn this loophole is getting better and better.

comment 5y ago · link · parent

Handy to find people using several identities, spammers with multiple accounts or to uncover throwaways.

comment 5y ago · link · parent

When you turn your android phone into a wifi hotspot, it creates a lan between your phone and the client. Isn't that enought ?

comment 5y ago · link · parent

Little trick if you ripgrep a lot of web projects:

alias rg="rg --max-columns 200 --max-columns-preview"

So now if you hit a minified css or js file, it will truncate any match longer than 200 characters instead of flooding your screen with a million chars line.

comment 5y ago · link · parent

When something like this happens, you realize that it's not ust your client or your company that sucks at testing software.

comment 5y ago · link · parent

rip grep works outside of a git repo

comment 5y ago · link · parent

PWA are indeed limited, but they are particularly so because Safari drags them down.

comment 5y ago · link · parent

Houses are something that have been built for 1000 of years, we mater the thing. And we have the tool to build them automatically: software, giant printers, etc.

Yet we still don't.

I do think it's possible that softwares will be built more and more by automatic tools (shopify, wix and wordpress are good examples), but 80% is a tad optimistic.

comment 5y ago · link · parent

Then use streams.

comment 5y ago · link · parent

Oh but redis is much more than that.

It's so simple any little script can interact with it in seconds, instead of having to craft complex SQL or import your wrapper. You can call redis from the weirdest places, like from the inside of an nginx config file. You needn't even a compiled driver if that matters.

It's easier to get it to perform. It's possible to get great perfs with PostgreSQL, but you just got them for free with redis. Very hard to screw up. Read, write ? N+1 ? Batching ? Who cares, it will be fast no matter the concurrency or the load.

Sure you can expire with Postgres, but having done so in practice, it's way harder than it looks to get right. With redis, you don't have to care. Set a cache, set a lock with a timeout, store data your are not sure you need. It will all disapear.

Redis is not just key/value. You have sets, so ensuring unicity is a piece of cake, no constraints to define, then insertion to check against. And of course, you have sorted sets, which you are kept ordered at insertion by any number you pair the value with, such as a timestamp/score/index, and truncate by range for extra magic.

And then you have bonuses like hyperloglog which you need an extension for in Posgres. Super handy for stats.

Finally, you have streams, which for most apps will fill the gap for a timeserie database or a way to store your app logs. All that with a 2ms latency at 10k/s requests. None of my projects ever needed more than 1K/s though, even one with 1M users/month.

You have all of that with a dead simple install and basically no maintenance.

In fact, redis by itself consume almost no resource, it's not even worth it to not have it in your toolset. I just install it by default on all my projects: I never regretted it, there is always something it can do for you. It not now, just wait a bit, it's costing you nothing, and something will come up.

So no, let use Postgres for what it's great at, which is being a robust all purpose database. Redis is a fantastic complement to it, not a competitor, just use both.

Unless you are google size, there are little chances you will reach a stage where you need to migrate from any of them.

It's part of those tech that are just too good to be true, like SQLite or Python.

My only regret is that it doesn't exist on windows.

P.S: if you need caching and can't afford redis on a small python script, use Disk Cache, it's awesome: http://www.grantjenks.com/docs/diskcache/index.html

comment 5y ago · link · parent

I suppose if arrays language get popular enough, we will get a module to use them as a DSL for libs like numpy, just like we have regex for strings, instead of a whole language dedicated for them.

It would be a win / win, you gain the strength of J, K and APL for array processing, without the weakness of them for anything else.

And just like with regex, you'll get fat disclaimers in doc telling you to not get carried away too much as it can quickly become unreadable.

comment 5y ago · link · parent

Not OP, but every time I do a purchase online with a new shop, my bank does this. Also every time I spend more than x euros in one transaction.

Before that they sent an SMS code, I much prefer the app notification.

comment 5y ago · link · parent

Offline first is a majors selection criteria for me.

First, it's just faster. Offline apps are an order of magnitude faster and the speed is stable.

Secondly, data is way easier to backup. I don't trust any provider with important data. Your account can be banned, or you could be locked out. There are outage, data corruption, human errors from people you share data with...

Then there is the no internet part. Internet at home can go off for many reasons, you may be abroad, in a plane, in a tunnel, in the country side. Or internet could be slow, unreliable, behind an agressive proxy, etc.

That's why i use thunderbird and not a web mail, dynalist and not the competition, mp3 and not spotify... That's why i keep osmand next to waze and torrents next to netflix.

Last week internet went down in accounting. They took the day off, because they used office 365. Great for them, not so much for the work to be done.

comment 5y ago · link · parent

Alternatively, just don't write an SPA. Write a regular site, with just the few interactive elements you need.

If you use react or vue, you can plug components precisely anywhere on the page, you don't need to take over the page entirely.

In fact, with vue, you can even put the template in the HTML directly, and just hook the logic on to it, angularjs v1 style.

comment 5y ago · link · parent

+1. I would even pay to watch you code this.

comment 5y ago · link · parent

That's what it should be, that's not how it's being sold, and how it's going to be used.

Just like for wikipedia.

comment 5y ago · link · parent

Unless the AI can talk tot the patient to get some context, it's going to be taking decisions with only very partial information, no matter how good it is.

Still, I'm thinking that as it improves, it's going to show that doctors are not that good at their job on average, and that's going to be fun to watch.

comment 5y ago · link · parent

For preserving comments, use redbaron: https://github.com/PyCQA/redbaron

It's lossless, besides, the API is much nicer.

comment 5y ago · link · parent

This is a recurring joke with my brother. One day he was giving me an advice that was technically true but absolutely impossible to follow.

I told him: "You know how to win a race again Usain Bolt? Just run faster!".

Now we regularly use "just run faster" as a punchline.

comment 5y ago · link · parent

I think my classmates in IT school learned much more from bypassing the network restrictions to play WoW in class than from the teachers themself.

comment 5y ago · link · parent

Above all, it's much more usable now, especially with 3.10 around the corner:

- you can use list[] instead of typing.List[]. Same for dicts or sets.

- you will be able to use bool | str instead of typing.Union[bool, str]

- mypy has saner default, is better supported by IDE and is way faster

- a lot of edge cases are now covered, including protocols for duck typing, vartype, etc.

- fantastic libs such as pydantic, fastapi and typer make using them a ton of fun

comment 5y ago · link · parent

That's basically how most modern frameworks do it.

Django-Rest-Framework does that with view + serializer + validators.

A more recent example, with a leaner and cooler implementation is FastAPI, where type hints are also use to declare validation on your end point, while a model is used for serializing the response.

comment 5y ago · link · parent

pydoit is not single language in the sense it limits your to tasks for your language. It's completely agnostic in that sense, and I use it for non python projects as well.

Even the fact it's using python to declare your tasks is not a problem: it's basically a function signature and a mapping, nothing you can't master in 5 minutes, and certainly simpler than make files DSL. Also easier to get right and debug.

The problem is the fact you need python to install it and run it, which non python dev will rightfully not care to do.

comment 5y ago · link · parent

A bit of a plug, but if you are using python in your project already, give a try to pydoit (pydoit.org/). It completely replaced make, task runners or build systems for me.

Pydoit is the sweet spot for most of my use cases:

- it scales up (graph of deps, file watcher, etc) but above all, it scales DOWN (simple stuff are dead simple)

- it promotes a declarative task definition

- it embraces the shell yet let you use python if you need to

- it gets out of your way and doesn't try to rule your project. It just runs what you want and disapear.

- the doc is nice

The biggest drawback is that you need to pip install it, which means non python devs will avoid it. I wish it was provided as an stand alone executable

1
138139140
184