

Vim fortunes - duggieawesome
http://www.moolenaar.net/fun.html

======
leokun
Yes, fortunes. Great. So much better than the async setTimeout patch he's
giving a hard time to that will let plugin developers actually build useful
tools.

[https://groups.google.com/forum/#!topic/vim_dev/-4pqDJfHCsM](https://groups.google.com/forum/#!topic/vim_dev/-4pqDJfHCsM)

The inanity of the comments in that patch discussion have me reconsidered
switching from vim to something else and I've been using vim for nearly ten
years. I can't believe how disappointing it's been to see that patch
discussion play out as it has.

~~~
icebraining
Can you point to such inanity? I've only read a couple, but he just seems
careful to me.

~~~
leokun
Asking that timers be identifiable. Can you imagine if setTimeout or
setIntervals were user facing in the browser in some kind of list that pops
up?

The entire debate about it being async or not. Nobody disputes that JavaScript
is an async language, but it only runs in one thread. And here the discussion
about it not being really async so it ought to be renamed, is such a silly
bikeshed that goes against much of what is considered async in other
widespread platforms (JavaScript and ActionScript being notable examples).

The being able to cancel a setTimeout. Imagine users being able to kill
asynchronous requests in the browser. Being able to cancel an HTTP request
that's modifying the server side database state. Canceling an asynchronous
line of execution could create all kinds of unexpected problems, and then
exposing that to the user?

The whole being careful thing in itself is insane. You can already create
plugins that break shit. You can already create plugins that block. You can
already create plugins that rewrite files in the user space and do god knows
what harm. That's what comes with exposing a plugin system that isn't
sandboxed. And vimscript and the python you can embed in a vimscript is not
sandboxed. It's the plugin developer's responsibility to not do stupid shit
and the user to not install stupid plugins. And there already are stupid
plugins, I've uninstalled some myself.

That's the inanity.

~~~
dguaraglia
Actually, users are able to cancel requests on the browser. All they need to
do is close the page mid-request. You can try it yourself: write a server that
takes 10 seconds to reply to a request, fire an AJAX request for that resource
and kill the tab. The request won't make your browser hostage to the server's
delay.

And that's where this implementation fails: it makes it possible for a
misbehaving 'async' call (not really async, just timed) to hijack the editor
and make it unusable. I know that can be done in the editor as-is, but
considering that writing asynchronous/multi-threaded code is _way_ harder than
your usual linear Vim plugin, I think it's better to wait until there's a
proper async mechanism instead of setting a subpar precedent.

~~~
leokun
> "not really async, just timed"

Let's bikeshed some more.

> "And that's where this implementation fails: it makes it possible for a
> misbehaving 'async' call (not really async, just timed) to hijack the editor
> and make it unusable."

Actually the patch now addresses all of these concerns, you can cancel the
setTimeout scripts.

> "but considering that writing asynchronous/multi-threaded code is way harder
> than your usual linear Vim plugin"

Vim is not thread safe, you can't write a multi-threaded plugin with vim. It
will break.

~~~
jasonlotito
> Let's bikeshed some more.

Bikeshedding is about things that really don't matter.

However, something being timed or async do matter. Describing something as
async when it's not destroys the meaning of async and confuses what it really
does. At the very least, describe it as "blocking async" so it's clear what it
is.

Basically, call it what you will, but if you describe it as async, I expect it
will be non-blocking because that's what async is by default.

~~~
leokun
It's the exact same thing that happens in the browser. If you write a
setTimeout and never let go, like a never ending while loop it will block your
browser forever.

------
icebraining
Funny, but sheesh, are some of these outdated ;)

 _hundred-and-one symptoms of being an internet addict: 194.

Your business cards contain your e-mail and home page address_

