Commit feaf92c3 authored by Yuanle Song's avatar Yuanle Song
Browse files

update doc

parent 45afebaa
Loading
Loading
Loading
Loading
+39 −1
Original line number Diff line number Diff line
* COMMENT -*- mode: org -*-
#+Date: 2018-05-04
Time-stamp: <2018-05-10>
Time-stamp: <2018-05-11>
#+STARTUP: content
* notes                                                               :entry:
** 2018-05-09 how to release latest code on PyPI?
@@ -392,6 +392,38 @@ via env var and command line parameter.
  env HOST=127.0.1.1 PORT=abc stack exec rd-api -- --host=127.0.0.1 --port=8060
  env WORKER=1 stack exec rd-api

  v1.1.1.0 all works.

  but I don't like the code in updateRDConfigFromEnvPure
  it's unpleasant code.
  error handling shouldn't be this complicated.

- check how other people handle env variable.
  - envparse, this is similar to ~/haskell/env-var-parser/
  - envy
    https://www.stackage.org/lts-10.3/package/envy-1.3.0.2

    based on the doc. I can see why updateRDConfigFromEnvPure is too
    complex. it is trying to do too many things.

    the applicative style should be used to create values.

    just find another way to do the merge on two value of the same type. or
    update the runParser to support it.

    envy also support infer env var from record field name, by using
    GHC.Generics. So you no longer need to write a parser.

    - check how envy works.
      ~/haskell/testing/handle-params/app/Main.hs

      TODO envy doesn't handle Bool well.
      only True is accepted as true.
      yes, true, on, 1 not accepted as true.

  - read-env-var, this is a simple wrapper on lookupEnv and
    Text.Read.readMaybe. Not what I need.

** 2018-05-05 utf-8 character not working well in path.
curl http://localhost:8082/rd/%E4%B8%AD%E6%96%87%E6%96%87%E4%BB%B6%E5%90%8D.rar
{"ok":true,"path":"中"}
@@ -482,6 +514,12 @@ import RD.Client.Opts
I remember there are tools that can simulate packet loss.
policy in ovs can do it.

- 2018-05-11 tcp - Simulate delayed and dropped packets on Linux - Stack Overflow
  https://stackoverflow.com/questions/614795/simulate-delayed-and-dropped-packets-on-linux

  test this in vbox VM. stretch01
  see stretch01 daylog.

* done                                                                :entry:
** 2018-05-08 rd-api, allow serve static file without redis-server.
--disable-rd-api