GHC 2019-06-01

2 comments.

, https://git.io/fjE3l in SNH48Live/KVM48
Perf mode: "HD" is now 360p
===========================

Geez, this is getting ridiculous. Whenever you think they can't sink lower, they always find a way. Life always finds a way.

Example: https://live.48.cn/Index/invedio/club/1/id/2861, https://ts.48.cn/snh/20190529/gaoqing/337596915956649984.m3u8.

```console
$ metadata 337596915956649984.mp4
Filename:               337596915956649984.mp4
File size:              1480497919 (1.49GB, 1.38GiB)
Container format:       MPEG-4 Part 14 (MP4)
Duration:               03:06:30.04
Pixel dimensions:       640x360
Sample aspect ratio:    1:1
Display aspect ratio:   16:9
Scan type:              Progressive scan*
Frame rate:             25 fps
Bit rate:               1058 kb/s
Streams:
    #0: Video, H.264 (High Profile level 3), yuv420p, 640x360 (SAR 1:1, DAR 16:9), 25 fps, 983 kb/s
    #1: Audio (und), AAC (LC), 48000 Hz, mono, 70 kb/s
```

, https://git.io/fjEqd in dbcli/litecli
> it looks like there is a way to bind the variables using the execute() function.

Yes, it's formally defined in [PEP 249](https://www.python.org/dev/peps/pep-0249/) (Python Database API Spec v2). See specifically https://www.python.org/dev/peps/pep-0249/#id14 and https://www.python.org/dev/peps/pep-0249/#paramstyle. Of course the syntax is based on established conventions used by DBMSes themselves. See for instance [`sqlite3_bind()`](https://www.sqlite.org/c3ref/bind_blob.html).

> What is the motivation behind your request?

The motivation is interoperability. The "shell style" definition AFAIK is only usable in litecli, while the question mark binding style could be used directly in source code and possibly other database companion tools, and it could appear in logs and stuff. E.g. one thing I frequently do while troubleshooting a website/web app backend is to copy a parametrized query (in question mark style, not surprisingly) from logs and play with the query in an REPL. Currently I have to replace the question marks with $1, $2, ... if I want to use the query in litecli.

Now that I think about it, it's probably hard to support both styles in the same code path due to quoting issues (IIRC that's partly why I raised an issue instead of a PR...), but why about a separate set of commands for the question mark style? Say `\fqs` to save a question-mark-style favorite query, and `\fq` to use one?