惠特曼《曼哈頓:纵慾之城》汉译

「纵慾之城」(City of Orgies)是美国著名同性恋诗人沃尔特惠特曼于1860年创作的诗,当时诗人居住于纽约曼哈顿城区,与形形色色的人交往、恋爱。收录于《草叶集》。无奈网上未见汉译。

City of Orgies

CITY of orgies, walks and joys!
City whom that I have lived and sung in your midst will one day make you illustrious,
Not the pageants of you—not your shifting tableaux, your spectacles, repay me;
Not the interminable rows of your houses—nor the ships at the wharves,
Nor the processions in the streets, nor the bright windows, with goods in them;
Nor to converse with learn’d persons, or bear my share in the soiree or feast;
Not those—but, as I pass, O Manhattan! your frequent and swift flash of eyes offering me love,
Offering response to my own—these repay me;
Lovers, continual lovers, only repay me.

以下试译。我知道翻得不好,但是希望能抛砖引玉:

纵慾之城

无数纵慾、游荡与欢愉之城!
我在你其中生活与歌咏,总有一天我会让你名声显赫,
我不要你的游行——不要你的五光十色,你的精彩,来报答我;
我不要你无尽的房子——或是港湾里的船,
或是街上的行人,或是明亮的窗子,摆满商品;
也不要学者的谈话,或在晚会或大餐里饱餐一顿;
我不要那些——而是,当我路过,曼哈顿啊!你那些频频而匆匆的眼神要献给我爱,
那些回答了我的眼神——这些才报答我;
恋人们,一个又一个的恋人们,只有他们才能报答我

Supervisor.d by default doesn't stop child processes

Supervisor is a program that, well, supervises your script and can restart them if needed. This is particularly useful for discord bot hosting, because apparently, the Websocket module that discord.py depends on may contain bugs that randomly resets the connection and there is nothing you can do about it.

Setting it up is pretty easy as well. The only caveat is that supervisor runs as the root user with some root directory as the working directory. In the start script you supply it's necessary to change to /path/to/your/program for your program to run. Here is an example set up

(/etc/supervisor/conf.d/foo.conf)

[program:foo]
command=/home/me/foo/run.sh
user=me
autostart=false
autorestart=true
stderr_logfile=/home/me/foo/logs/foo.err.log
stdout_logfile=/home/me/foo/logs/foo.out.log

(/home/me/foo/run.sh)

#!/bin/bash
cd /home/me/foo && /home/me/.pyenv/shims/python bot.py

Supplying absolute paths everywhere might be an overkll but it's the safe thing to do.

So all is well, until you try to stop this program. Turns out in this setting, the python program is spawned as a child process by the run.sh script process, and supervisor.d is only responsible for stopping the run.sh process, not the child process it spawns. Similarly, running supervisorctl restart foo will now create a new python program without stopping the first one.

Solution

I know you are here for this. Add the following line

stopsasagroup=true

to foo.conf. Reread & update your supervisor task. From now on when the supervisor send a stop signal it will propagate to all the child processes in the same process group.

Makes sense?

See also

Turns out someone already posted the same solution but in a differnet context.

百万角色别 discord 整理(持续中)

这次 Theater Boost 活动引发了许多 P 群体发觉需要有方便的沟通渠道的必要性。不管是在没有 Gree 会议室可用的两位新偶像P还是知道 Gree 将来会停止服务的老P们都纷纷出来寻找新的沟通平台。其中很值得实验的是 discord。discord 是一个以游戏玩家为最初目标客群的语音、文字聊天应用,有网页应用、桌面应用与手机应用版。近期在欧美跟日本宅圈当中都有很多用户。

请看ARISA DB做的整理