Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

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.


My former company adopted Zulip because we were in the cybersecurity space and needed an on-prem solution. When I first saw it I thought "oh god this is going to be awful" - very ugly UI compared to Slack and others. But after getting used to it, I found that the UX is excellent.

For anyone searching around, don't be put off by the lack of "polish" - Zulip has a really good fundamental design.


When everyone on the team learn to use Topics, it's life changer.


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.


> - trigger a full tree rendering, passing the new model

I agree the Elm model makes it easy to reason about it.

Just because we pass "the state of the world" each time instead of mutating it, does not mean that we need a full tree rendering. That is an implementation detail.

We can update just the relevant part. If we think of it mostly as pure functions a lot of it is easier to memoize and — for same input — it is possible to return the same output straight away.


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.


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.


5 times a year if you are a freelancer.


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


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


You need to unlock bitwarden. As mentioned above - this is more a solution for local development (against a non-local db).

For a service, one would need some kind of secret management - but a shell script could set this variable/value for input to eg docker or a k8s setup. Or the service (eg: heroku) could handle it.


"What happens on reboot" is a good question for a scheme that involves not using the filesystem, but bitwarden is not such a scheme. Everything will be fine after a reboot.


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.


The passphrase is hardcoded and kept in version control. ;D


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).


> But make sure you pop them from the os.environ dict once you read them to avoid accidental exposure.

I've always accepted this was an attack vector, and some malicious library could extract env vars.

This actually makes a lot of sense, thanks!


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.


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.


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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: