Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jonathan_s
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
1.
▲
by
jonathan_s
4y ago
If you can, best is to always spawn them in a task group (either using anyio or Python 3.11's task groups). This prevents tasks from being garbage collected, but also prevents situations where components can create tasks that outlive t
2.
▲
by
jonathan_s
4y ago
I've gone very recently through a rewrite from Rocket to Axum and very much love it so far. The initial motivation was the need for web socket support, which Rocket doesn't have (yet). But I love how simple it is, and also that it
3.
▲
by
jonathan_s
4y ago
Same experience here. Canvas rendering is much faster for terminal apps if done well. I think also VS code uses a canvas for its terminal because its superior performance.
4.
▲
by
jonathan_s
7y ago
No, there is nothing to remember. Every decent HTML templating engine these days will handle all free form text as unsafe and escape it automatically. The same for SQL libraries. Input sanizitation doesn't work, because it doesn't
5.
▲
by
jonathan_s
10y ago
Hi, I'm the author of prompt_toolkit. A library that does something similar for Python. Don't hesitate to copy anything you need. It took me a few iterations to get the API as I wanted. One thing I underestimated was the importanc
6.
▲
by
jonathan_s
10y ago
Also check out pymux: https://github.com/jonathanslenders/pymux
7.
▲
by
jonathan_s
11y ago
Yes, but it's unsafe for another reason. The new syntax can be verified statically by tools like Pylint. A call to locals() is hard to verify. The locals() function itself could for instance have been replaced by something else. When u
8.
▲
by
jonathan_s
11y ago
Yes, it does support true color. It's disabled by default, because not all terminals support it, but if you want 24bit, do: pymux --truecolor
9.
▲
by
jonathan_s
11y ago
(author). This is the first release of Pymux. It should be stable and usable for daily work. However, don't hesitate to create a GitHub issue in case you feel that it lacks some features/responsitivity or when you'd like to s
10.
▲
by
jonathan_s
11y ago
Sure it's true. And software written in C or assembly language often also performs better than those written in Python.
11.
▲
by
jonathan_s
11y ago
@amjith: we should do that indeed. If you don't have the time, I'll help you doing it later on.
12.
▲
by
jonathan_s
11y ago
Hi, thanks for the suggestions! Actually, the internal representation, is completely separate from the layout. It's not in another repository, but it's decoupled. The key bindings are also separate. Getting emacs bindings is not m
13.
▲
by
jonathan_s
11y ago
Can you tell me what terminal application you are using? Does it happen as well in a new terminal?
14.
▲
by
jonathan_s
11y ago
It's a blackbox re-implementation. In Python, things are done different from C and there are other libraries are available (Pygments for instance). I also don't want to claim that it is as powerful as Vim is. But it should be stab
15.
▲
by
jonathan_s
11y ago
Yes, it should normally work with all unicode characters. (If not, please file a bug.)
16.
▲
by
jonathan_s
12y ago
This could be confusing. '?' is for searching backwards, '/' for searching forward. Because we are in a multiline environment, I preferred the Vi keybindings instead of the readline bindings (where '/'
17.
▲
by
jonathan_s
12y ago
>> It would be really helpful, to just search for some keyword and have the last occurence... In Vi-mode, use ControlX-ControlL after typing the start of the line, then you have line based completion, which also completes from the his
18.
▲
by
jonathan_s
12y ago
Thanks for the feedback. About "daw": it looks like I forgot about that. To be fixed, but right now use "diw" instead. (Please create a github issue if there are some other important key bindings missing.) At the moment,
19.
▲
by
jonathan_s
12y ago
Thank you for the feedback. I'll add an option to turn off the automatic autocompletion.
20.
▲
by
jonathan_s
12y ago
I'm sorry about this, at the moment there is no Windows support. However the architecture of the library decouples the input and output from the rest, so it should be possible to plug in something to make it compatible with the Windows
21.
▲
by
jonathan_s
12y ago
(author here) I noticed. You're not doing it wrong. It's a bug and it will be fixed asap.
22.
▲
by
jonathan_s
12y ago
We have that: https://github.com/django-extensions/django-extensions/commi... (Not yet on Pypi, we we'll get there.)
23.
▲
by
jonathan_s
12y ago
(author here.) The idea is indeed that ``ptpython`` could become the terminal front-end for IPython. The only thing on which ``prompt_toolkit`` is focussing, is reading input from stdin and returning it to the application. IPython is a very
24.
▲
Redis client library for asyncio (Python 3.4)
(asyncio-redis.readthedocs.org)
1 points
by
jonathan_s
13y ago
|
0 comments
25.
▲
by
jonathan_s
13y ago
Like the article of @madjar in the comment above explains. There is a reason for definitely not using gevent.
26.
▲
by
jonathan_s
13y ago
Asyncio is really nice. Definitely a joy to use and easier to learn then Twisted. I have a Redis client library with full pubsub support: https://github.com/jonathanslenders/asyncio-redis