Re: [PATCH] Proof of concept: thread-safe message queue

2014-01-14 Fir de Conversatie kans
On Tuesday, January 14, 2014 4:03:21 PM UTC-8, Thiago Arruda wrote: > On Tue, Jan 14, 2014 at 7:10 PM, kans wrote: > > > Thiago, > > > > > > I am not hopeful for this patch, but I would love to see you succeed. We > > spent around two months working on

Re: [PATCH] Proof of concept: thread-safe message queue

2014-01-14 Fir de Conversatie kans
Thiago, I am not hopeful for this patch, but I would love to see you succeed. We spent around two months working on adding async support to Vim without threads, https://groups.google.com/d/msg/vim_dev/-4pqDJfHCsM/LkYNCpZjQ70J . We added a timer function and called the callbacks in the main lo

SIGSEGV

2013-12-18 Fir de Conversatie kans
* thread #1: tid = 0x13cef2, 0x00010806acac vim`re_multiline(prog=0x000c) + 12 at regexp.c:741, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x14) frame #0: 0x00010806acac vim`re_multiline(prog=0x000c) + 12 at regexp.c:741 frame #1

SegFault in (mark.c:set_last_cursor)

2013-10-21 Fir de Conversatie kans
Ran into this guy using ctrl-p. I don't have a traceback, but the problem is that close_buffer sets win->w_buffer to NULL and set_last_cursor then explodes. Since w_buffer isn't guaranteed to exist, set_last_cursor should just check for it. more info: close_buffer(win, buf, action, abort_if

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-10-13 Fir de Conversatie kans
On Sunday, October 13, 2013 3:00:42 PM UTC-7, ZyX wrote: > On Oct 14, 2013 1:00 AM, "ZyX" wrote: > > > > > > > We also have :syntax on, filetype plugin on and so on. So I think it > > > > makes perfectly sense to be able to turn timers off globally using e.g. > > > > :timers off > > > > > >

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-10-10 Fir de Conversatie kans
> It's actually similar to the > > request for the :timer command. We renamed the feature to +timers. Are you referring to a different patch or to this one? At any rate, I tracked down the final bug. We were actually stealing cpu time by calling select far too often (20ms) when select is cal

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-10-08 Fir de Conversatie kans
On Wednesday, October 2, 2013 3:40:05 PM UTC-7, kans wrote: > On Friday, September 27, 2013 8:04:25 AM UTC-7, Ben Fritz wrote: > > On Thursday, September 26, 2013 4:53:55 PM UTC-5, kans wrote: > > > > > > As Bram pointed out ctrl-c doesn't work on windows. I'

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-10-02 Fir de Conversatie kans
On Friday, September 27, 2013 8:04:25 AM UTC-7, Ben Fritz wrote: > On Thursday, September 26, 2013 4:53:55 PM UTC-5, kans wrote: > > > > As Bram pointed out ctrl-c doesn't work on windows. I'm not going to try > > to fix that. > > > > CTRL-C works

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-26 Fir de Conversatie kans
On Wednesday, September 25, 2013 9:09:48 PM UTC-7, ZyX wrote: > On Sep 26, 2013 3:30 AM, "kans" wrote: > > > > > > > Java is the most used language these days and uses the Timer class. > > > > > > > > JavaScript w

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-25 Fir de Conversatie kans
> Java is the most used language these days and uses the Timer class. > > JavaScript wasn't designed properly, it has lots of confusing stuff, I > > would never use it as an example for proper design. Only for ideas. Its true that JS was designed in a weekend, but it is easily the most popular

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-23 Fir de Conversatie kans
On Sunday, September 22, 2013 6:38:32 AM UTC-7, Bram Moolenaar wrote: > kans wrote: > > > > > Zyx, > > > > > > Thanks for the help. Intervals are no longer run if they error of any > > > sort (apart from a user interrupt which will likely happe

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-21 Fir de Conversatie kans
On Saturday, September 21, 2013 8:15:37 PM UTC-7, Ben Fritz wrote: > On Saturday, September 21, 2013 6:29:11 PM UTC-5, kans wrote: > > > > Thanks for the help. Intervals are no longer run if they error of any sort > > (apart from a user interrupt which will likely happen ac

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-21 Fir de Conversatie kans
On Thursday, September 19, 2013 3:29:35 AM UTC-7, ZyX wrote: > On Sep 19, 2013 2:01 PM, "kans" wrote: > > > > > > On Friday, September 13, 2013 2:43:13 AM UTC-7, kans wrote: > > > > On Thursday, September 12, 2013 1:59:51 AM UTC-7, ZyX wrote: > &

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-19 Fir de Conversatie kans
On Friday, September 13, 2013 2:43:13 AM UTC-7, kans wrote: > On Thursday, September 12, 2013 1:59:51 AM UTC-7, ZyX wrote: > > > On Sep 12, 2013 3:28 AM, "kans" wrote: > > > > > > > > > > > > > > On Wednesday, September 11

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-13 Fir de Conversatie kans
On Thursday, September 12, 2013 1:59:51 AM UTC-7, ZyX wrote: > On Sep 12, 2013 3:28 AM, "kans" wrote: > > > > > > On Wednesday, September 11, 2013 7:46:06 AM UTC-7, ZyX wrote: > > > > On Sep 11, 2013 1:27 PM, "Thomas" wrote: > > &g

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-11 Fir de Conversatie kans
On Wednesday, September 11, 2013 7:46:06 AM UTC-7, ZyX wrote: > On Sep 11, 2013 1:27 PM, "Thomas" wrote: > > > > > > On 11 September 2013 00:18, Nikolay Pavlov wrote: > > >> > > >> Why do you keep calling it async? > > > > > > Referring to the introduction to asynchronous programming linked

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-10 Fir de Conversatie kans
On Thursday, September 5, 2013 10:53:39 AM UTC-7, kans wrote: > On Thursday, September 5, 2013 9:08:16 AM UTC-7, Ben Fritz wrote: > > On Thursday, September 5, 2013 8:44:15 AM UTC-5, Bjorn Tipling wrote: > > > > As someone already mentioned: If the command takes too much ti

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-05 Fir de Conversatie kans
On Thursday, September 5, 2013 9:08:16 AM UTC-7, Ben Fritz wrote: > On Thursday, September 5, 2013 8:44:15 AM UTC-5, Bjorn Tipling wrote: > > > As someone already mentioned: If the command takes too much time, Vim > > > will get stuck. E.g. when it reads from a socket. It might be possible > >

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-03 Fir de Conversatie kans
On Tuesday, September 3, 2013 1:07:00 PM UTC-7, Ben Fritz wrote: > On Tuesday, September 3, 2013 1:53:31 PM UTC-5, kans wrote: > > On Tuesday, September 3, 2013 9:04:40 AM UTC-7, Ben Fritz wrote: > > > On Sunday, September 1, 2013 8:42:25 PM UTC-5, Geoff Greer wrote: >

Re: [PATCH] Asynchronous functions (settimeout, setinterval, and cancelinterval)

2013-09-03 Fir de Conversatie kans
On Tuesday, September 3, 2013 9:04:40 AM UTC-7, Ben Fritz wrote: > On Sunday, September 1, 2013 8:42:25 PM UTC-5, Geoff Greer wrote: > > This patch adds asynchronous functions to vimscript. If you want to perform > > an action in 700ms, simply: > > > > let timeout_id = settimeout(700, 'echo("hell

Async/Event Driven Vim

2013-06-12 Fir de Conversatie kans
It is exceedingly difficult to create interactive plugins with Vim- asynchronous scripting is all but impossible. Consider the simple goal of performing a periodic task- say every 100ms. I know of three methods available to do so, but each is unintuitive and has side effects which create a poor