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

Not as mobile: you need internet and a smartphone. I still have a friend with a dumb phone. I'm sometimes in zones without internet but my mum call me and ask me to give her some confirmation code I receive.

Not as simple: stuff arrive in the spam folder. Some providers just reject your valid mail (my main email tld is exotic, it causes lots of troubles). People receive so much junk they lose your message in 1000 of unread mails or are afraid of checking them.

Not as interoperable: there are new kids that just don't have emails setup on their phone. They check them once a month at home on the computer. Email is for old people (although text is getting there too).

Plus email is almost as easy to spoof and intercept, so the gain would be minimal.

comment 4y ago · link · parent

Sure, if you find something as interroperable, free, simple and mobile, go for it.

comment 4y ago · link · parent

Yes because we all work in perfect world under optimal conditions.

comment 4y ago · link · parent

https://www.google.com/search?hl=en&q=apple%20ochestrate%20l...

comment 4y ago · link · parent

We can't expect the general public to be very good at security.

I gave up on PGP, and most of my clients and I don't have an e2e encrypted chat or password manager service in common.

But at least I tell them to use a "burn after reading" post on an encrypted pastebin like 0bin.net for the secrets thing to send me.

It adds almost no complexity, best case scenario, you increase the security against bots since they would need to parse the link, visit the paste, trigger the Burn After Reading feature, interpret JS, extract the password and use it. That's already a pretty specific bot.

Most interceptions, even human, will be detected thanks to the burn after reading. And the password is never stored in the pastebin db since it's encrypted client side.

Worst case scenario, it's the same than a plain text email. Not much to loose.

It's easy to teach. Requires no install, little skill or tech, works in most corporate setup.

It's not good security. But it's better than abysmal security.

comment 4y ago · link · parent

Also, it is suspected than Apple actually orchestrate those "leaks" for free publicity.

comment 4y ago · link · parent

Yes, but authenticity as value signaling, not as a commitment to behave without unnecessary layers.

I lived in a meditation center for a year, and I saw some people there that claimed to be authentic, and worked to look like the stereotype. But they were actually hiding a desire for materialism and the failure to live up to it behind the apparent choice of rejecting it.

Irony can be pretty ironic.

comment 4y ago · link · parent

I fear that we will get used to some image patterns feeling right instead of reality if AI gets involved too much.

comment 4y ago · link · parent

That's what I mean by hard to optimize. Memoization is hard to get right, because if you compare only by value, it can be slow, but if you compare by identity, the cache can take a lot of memory.

And of course, forcing a purely immutable model comes with its own unique challenges.

comment 4y ago · link · parent

You have the burden of responsibility, because you take it. Many people in charge don't and will gladly blame others as much as they can, yet get away with it because some management don't wish for integrity, but need a watchdog.

comment 4y ago · link · parent

Yes, all the companies are rent seeking.

They don't want having to keep producing value to deserve the money, they want to just cash in, indefinitely, like nobles used to do.

comment 4y ago · link · parent

Zulip is really underrated.

It's a chat app that doesn't eat your life, but just provides the service of helping you to communicate. It doesn't want to interrupt your workflow. It doesn't try to connect to everything. It makes it easy to organize work conversations and doesn't wish to be the remote work coffee machine.

It seems unreal that nowadays, I find solace in a software for finally trying to help me instead of extracting value or stealing attention from me. It should be the default.

Zulip is just that: the vlc of team chat.

comment 4y ago · link · parent

And hence the general recommendation of having a single direction in your input/render cycle:

- wait for input

- a dispatcher take any input and turn it into a queue of model update actions

- pop queue to perform latest model updates.

- trigger a full tree rendering, passing the new model

- start again

So:

- the model is a dumb static data structure

- the dispatcher is the responsible for model updates and is a single entry point for the data flow

- the UI and the model don't know about each other

That what ELM, react and so on do now. Monodirectional MVC. It's hard to optimize the rendering though, but it's way easier to reason about when concurrency gets high.

comment 4y ago · link · parent

Can't you just declare:

    my() {
  script_name="$1"
  script_path="$HOME/.local/bin/my/$script_name"
  shift
  $script_path "$@"
    } 
So you have your namespace ? Of course that mean you must put all script in .local/bin, not anywhere in the PATH, and some more work is needed to figure out completion.

But it seems less weird than the comma.

-- EDIT --

With completion:

export MY_SCRIPS_DIR="$HOME/.local/bin/my"

_my_completions() {

   if [ "${#COMP_WORDS[@]}" != "2" ]; then
     return 
   fi

   COMPREPLY=($(compgen -W "$(echo $(find "$MY_SCRIPS_DIR" -printf '%P\n' ))"))
 }


 my() {
  script_name="$1"
  script_path="$MY_SCRIPS_DIR/$script_name"
  shift
  $script_path "$@"
 } 

 complete -F _my_completions my
-- EDIT 2 --

After testing both, the comma win. Kiss, more flexible.

comment 4y ago · link · parent

You need your app to have the bitwarden decryption passphrase to read it. Do you intent to enter that manually if the server reboots ?

If not, then it's a secret you must manage, and you are back to square one: either using a simpler solution, use a hardware key, or going full secure vault service, with privileged first request, and so on.

comment 4y ago · link · parent

5 times a year if you are a freelancer.

comment 4y ago · link · parent

Linux already stores plenty of secrets in files in /etc. Just do the same: the root protected init file for your app likely has a mechanism for passing an env var to the new process. Systemd and supervisor do. Then pop os.environ instead of reading it, and you are safe from bots and script kiddies, which is likely your threat model

comment 4y ago · link · parent

And what happens on reboot ? Then you get to hardware solutions, and a small website is not going to want that.

comment 4y ago · link · parent

Env vars in systemd or supervisor files are fine for small server projects. But make sure you pop them from the os.environ dict once you read them to avoid accidental exposure.

For the desktop, use the keyring module.

If you start to scale up your threat model, you should use a vault, but the setup is way more costly, and tricky to get the reboot story right (hence the priviledged first requests comments).

comment 4y ago · link · parent

Depends of the size of your setup. Most website are small, and their threat model don't require more than having the secrets in a systemd file env statement.

After all, if you have a single server, and the attacker can read a root protected file oe the spawned processes context, you are pwned already. As for exposing env var, popping os.environ is usually enough.

No need to pay for more than you must: bots and script kiddies are not mossad.

comment 4y ago · link · parent

The name suck, but the idea is they are plugguable: check the django packages site for an idea of the benefit of that. It's essentially a plugin system with autoloading of some resources, such as the model and templates.

Also, apps override each other in the order or import. E.g one app can override the template of another just by using the same name. This means you can plug AND extend.

comment 4y ago · link · parent

Django-allauth usually got you covered, but in the rare case it doesn't, creating a micro service just for auth is a way better alternative than a complete rewrite.

comment 4y ago · link · parent

I do pretty much the same, which makes me think it should be django default startup template.

I would also do:

- install django_extensions and django_debug_toolbar

- rename the admin URL route to contain a uuid

- setup black, mypy, pylint, ipdb, ipython, dotenv and doit (I do so for all my python projects)

- manage.py createsuperuser

Also, very often :

- setup celery (locally with fs backend)

- setup vitejs

- install sentry and mailtrap plugins

- install django-allauth

- install DRF

And currently exploring:

- replace DRF with django ninja

comment 4y ago · link · parent

We could even call it "arm club" in reference to fight club, to make it popular. And eventually give it a cute nick name ending with -y like arm cluby. Or army.

comment 4y ago · link · parent

You didn't get the /s of the thread apparently. I'm French. The US gun politics are bonkers to me.

Seriously, what sane person would be worried that a lone terrorist would manage to bring a tank to a suburb and need a civilian Javelin to fight that ? If a tank is at your door, it's not terrorism, it's war.

The fact it seemed credible enough for you to answer seriously to it makes me think the USA situation is even worse than I thought.

comment 4y ago · link · parent

Nice

I have wished for a while that browser would store the entire page of any bookmark you save automatically, and put a decent search engine on it. I wrote a script once to do it for my bookmarks, and it didn't even take that much space on my hard drive.

Your system could be a Firefox addon, kinda like what scrapbook used to be, but automatic. Even with a note system, and storing metadata, Zotero style, but without the need for the dual setup.

comment 4y ago · link · parent

If Ukraine had been in NATO, Russia wouldn't have invaded.

They did because Ukraine was in the verge of joining, knowing that once it was done, they would not be able to attack anymore.

Plus, NATO being historically a shield, not a sword, Russia stance was basically the equivalent of stating "to look for safety or we kick your ass".

comment 4y ago · link · parent

Not to mention fireworks show it can be a perfectly safe endeavor with the proper legal framework. Even kids can use them.

No, I'm way more worried about the fact a terrorist could come at my door with a tank at any moment and I have no way to defend myself. And what if it's not a terrorist ? What if I have to defend myself against the state itself ?

At least we should be able to equip the schools to protect our children, if not directly our homes.

comment 4y ago · link · parent

It is incredible to use though. I pasted the return value of an API call in comment, then started to write a schema class. Codepilot just created the entire class for me. wanted to extract a subset of the data, I typed get_<_name_of_the_subset>(), it wrote the code I would have written.

So even without using someone else code, just the pattern understanding and the production of simple boiler plate code is great.

comment 4y ago · link · parent

MS has a long history of taking something (a tech, a concept, etc), playing fair for years to attrack people, then add more and more little details that in the end, lock you in into their ecosystem.

In this particular instance, MS has been pushing the "dev env in the cloud" commercial strategy for some times, using the openess of the VSCode ecosystem as on of the bait.

Don't get me wrong, I think VScode is a good product, and I can see the value of a dev env in the cloud that matches your local setup.

But given MS track record, I expect this to be likely a way to take control of your dev env: once it mostly resides on their server, you are locked in.

Parts of VSCode being not free are one of those little details I talked about. They hint at the direction MS is likely going to follow, as it used to do in the past.

1
959697
184