all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Arthur Miller <arthur.miller@live.com>
Cc: tomas@tuxteam.de, emacs-devel@gnu.org
Subject: Re: Gathering data on user preferences
Date: Wed, 08 Sep 2021 09:14:53 +1000	[thread overview]
Message-ID: <87mtooj633.fsf@gmail.com> (raw)
In-Reply-To: <AM9PR09MB49774929DB93F0255CCEF52596D39@AM9PR09MB4977.eurprd09.prod.outlook.com>


Arthur Miller <arthur.miller@live.com> writes:

>
> Who said human intervention? :-)
>
> I see emacs as a good tool for shell scripting and text processing. In general I
> am surprised that lisp(s) are second grade citizens in the land of web scraping,
> text processing etc, python being No 1 atm and js no2.
>
> Thomas asked why not s-exps? And I also wonder. If we sent s-exps over the wire,
> maybe it would be less processing involved? Write incomming s-exp to emacs
> server socket? Is it too wild to think of? :)
>

Yes it is. Your creating lots of work to create a solution which would
perform badly and be overly fragile and resource expensive. Emacs is
simply the wrong tool for this task.

We could use s-exp, but I don't see any benefit as I would not be using
Emacs to process the data. Its like asking "Why don't we use Emacs as a
bug tracker?" - the answer is you could, but there are better bug
trackers out there.

I also think your not considering the concurrent nature of web servers.
Requests are not serial and multiple requests can come in at the same
time. If you were going to write the data to Emacs via a socket, you
need to handle multiple socket connections at the same time and respond
to the web server in a timely manner to prevent timeout errors etc. 

We would have to disagree here. I don't think Emacs is a good general
purpose tool for shell scripting and text processing in this scenario at
all. It is completely the wrong tool for the task.

- It is huge compared to other tools. Why would you fire up Emacs on a
  server just to process a small chunk of data from a POST request?

- Emacs is not multi-threaded, so you would either have to fire up an
  Emacs instance for every connection (terribly slow) or you wold have
  to write some handler code to write the data to intermediate files and
  then have some Emacs process fire up at some point to process the
  received data. You would also need to implement some form of
  locking mechanism to ensure Emacs doesn't try to read data which
  hasn't completed writing yet and you still have to write some form of
  handler in something just to generate the intermediate data files. The
  solution would end up more complex and prone to bugs than necessary.

- Compared to other scripting solutions, Emacs is extremely slow. This
  is partially because it has an internal structure oriented towards
  being an editor, not a general purpose scripting environment. 

Just because you can do almost anything with Emacs doesn't mean you
should. If you really want to use a lisp language, there are far better
choices for this scenario (like one of the many lisp based shells like
lsh, schsh, rep, guile etc). 



  reply	other threads:[~2021-09-07 23:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07  3:22 Gathering data on user preferences Tim Cross
2021-09-07  4:25 ` Howard Melman
2021-09-07  6:28   ` Eli Zaretskii
2021-09-07 13:22     ` Howard Melman
2021-09-08 13:37       ` Philip Kaludercic
2021-09-07  6:42 ` tomas
2021-09-07  7:54   ` Tim Cross
2021-09-07  8:11     ` tomas
2021-09-07  9:09       ` Tim Cross
2021-09-07 12:32         ` Arthur Miller
2021-09-07 13:48           ` Tim Cross
2021-09-07 14:52             ` Arthur Miller
2021-09-07 16:53               ` Tim Cross
2021-09-07 18:46                 ` Arthur Miller
2021-09-07 23:14                   ` Tim Cross [this message]
2021-09-08  7:52   ` Philip Kaludercic
2021-09-08  8:14     ` Tim Cross
2021-09-08 10:41       ` Daniel Fleischer
2021-09-08 13:02         ` Tim Cross
2021-09-08 12:52       ` Philip Kaludercic
2021-09-08 13:00         ` Tim Cross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtooj633.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=arthur.miller@live.com \
    --cc=emacs-devel@gnu.org \
    --cc=tomas@tuxteam.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.