Filter
Exclude
Time range
-
Near
24 Feb 2025
今天才知道 Streamlit,简单说就是一个 Python 的 UI 框架,可以快速实现简单交付的逻辑,真的超级好上手。 实现原理很像 React,里面也有一个 IOLoop,所以副作用(缓存变量)需要额外管理。 谈不上全面能打,但你就说我快不快吧。 streamlit.io/ 怎么发现的呢?今天在本地跑一个 ollama RAG,发现方案提供方用 streamlit 实现了一个上传 PDF 页面,两行代码。
4
3
57
5,760
18 Jan 2025
Replying to @wwwgoubuli
我倒是觉得 ioloop executor async/await 的易用程序显著高于 goroutine。比如 async/await 可以轻易的拿到返回,goroutine 还得套一层 channel
2
7
598
30 Nov 2020
It's mostly a problem for writing re-usable packages - if you need to provide a function that can be used in both sync and asyncio, you can't easily just "detect if I'm in an ioloop", and end up writing a lot of duplicate code. Or perhaps I haven't figured out the best way yet
2
At this point use either my Moo or sri's Mojo::Base by default. Path handling, Path::Tiny or Mojo::File Event driven, IO::Async or Mojo::IOLoop
2
Replying to @yenzie
Future::AsyncAwait just implements a protocol now, if you want to implement it for whatever promise/ioloop you want. @cpan_pevans
1
3
Fair question! Future::AsyncAwait is basically an optree tweaking keyword plugin that does suspend/resume within a single subroutine and is oriented around Future (Promise) objects. The actual underlying driver though is IO::Async::Loop / Mojo::IOLoop.

hum... how is this actually implemented ? I thought it was not a good idea to build threaded perl, for instance...
2
Got asked about event driven OpenGL. It has a glutIdleFunc() export that takes a callback. So: use curry; use IO::Async::Loop; glutIdleFunc(IO::Async::Loop->new->curry::loop_once); use curry; use Mojo::IOLoop; glutIdleFunc(Mojo::IOLoop->singleton->curry::one_tick);
1
1
2
Problem: "I need to invoke a callback repeatedly but the first call must be executed immediately while the others every one second" Solution: my $id = $ioloop->tap(next_tick => $cb)->recurring(1 => $cb); #perl #mojolicious
2
6
Ended up moving call to shutdown ioloop to separate function, and then mocking it so it doesn't actually executes. I then assert against the mock
1
Any #python Tornado users know how to write an integration test that asserts the ioloop has been shutdown gracefully? I have the code for the graceful shutdown, but am stumped by how to test it (considering the ioloop to be shutdown will be used by the test suite?)
1
1
In anticipation of the upcoming #mojolicious 8.0 release, I've deprecated Mojo::IOLoop::ForkCall. Use the Mojo core Mojo::IOLoop::Subprocess instead! mojolicious.org/perldoc/Mojo… #perl

Mojo-IOLoop-ForkCall-0.20 by JBERGER metacpan.org/release/JBERGER…
1
1
3
12 May 2018
How many developers does it take to debug a Tornado IOloop problem?
2
1
6
How to correctly use ioloop in multithread environment? reddit.com/r/Python/comments…

2
19 Aug 2017
CPAN: Mojo-IOLoop-ReadWriteFork-0.24 (JHTHORSEN) - metacpan.org/release/JHTHORS…

Replying to @xdg @lilyliterate @pjf
I find that print debugging is sometimes the best, especially in nonblocking/ioloop code
1
Mojo::IOLoopはwatcher objectみたいなやつをスコープが外れても生きているようにしないといけないのかが、ソースコード読まないとほとんどわからないのがイマイチ。 #perl
1
1
6 May 2016
"Fizeram um IOLoop mais rápido do que o #NodeJS para #Python..." "Ah, só que não é mais rápido do que #Erlang" (-‸ლ) (╯°□°)╯︵ ┻━┻
1
Mojo-IOLoop-ReadWriteFork-0.17 by JHTHORSEN metacpan.org/release/JHTHORS…

1
19 Nov 2015
CPAN: Mojo-IOLoop-ReadWriteFork-0.16 (JHTHORSEN) - metacpan.org/release/JHTHORS…

1
Mojo-IOLoop-ReadWriteFork-0.16 by JHTHORSEN metacpan.org/release/JHTHORS…

1