From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Gathering data on user preferences Date: Wed, 08 Sep 2021 09:14:53 +1000 Message-ID: <87mtooj633.fsf@gmail.com> References: <87h7exkphw.fsf@gmail.com> <20210907064208.GB4097@tuxteam.de> <87czpklsng.fsf@gmail.com> <20210907081143.GD4097@tuxteam.de> <878s08lpem.fsf@gmail.com> <874kawlchc.fsf@gmail.com> <87v93cjoyy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12908"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.0; emacs 27.2.50 Cc: tomas@tuxteam.de, emacs-devel@gnu.org To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 08 01:54:18 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNkuv-0003A3-Jr for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Sep 2021 01:54:17 +0200 Original-Received: from localhost ([::1]:48098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNkuu-0008DY-8u for ged-emacs-devel@m.gmane-mx.org; Tue, 07 Sep 2021 19:54:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNkuA-0007Y8-AG for emacs-devel@gnu.org; Tue, 07 Sep 2021 19:53:30 -0400 Original-Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:38559) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNku7-0005N8-0j for emacs-devel@gnu.org; Tue, 07 Sep 2021 19:53:29 -0400 Original-Received: by mail-pf1-x42d.google.com with SMTP id s29so475589pfw.5 for ; Tue, 07 Sep 2021 16:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=Oq16SkPguMQ8lfV1GKZEQjx739VXR6IOWkkoLpFy1A8=; b=GrltfOBiG4CTDEZPwBAyQdhRQb3jFGV9YLLtZFUiLh6c8i8jVelTbH38uNMDUppJ2+ Gd8KbrwZ0vVKf40gsBRv0ZQCaCuEVCuL6Zk6xoIY5lVepnVuUN4TFbLP68mYD9OS4tJq vAqTz4LMWMsaazcb7NrBEG6G6CLmd1veFy9ot182O9zv53NmzbWiycw8NQTiS67OTZiD 6Ws/DBvVv4vXf2rdI3mO4XaKHSvELb2PjKOe4244S4Igq77B+a/Gzr/Ye+bkoAl28yss wjeACL5sfLN/JeMSVMv8SlmXLm3Hv0wlChAyABbsW5pQPUjf3NDmavS0ouzAV9PnmEaj IXLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=Oq16SkPguMQ8lfV1GKZEQjx739VXR6IOWkkoLpFy1A8=; b=R2cDTSrfeo3dKVSdPXiLJW0rq/hHtOgcfNvbb06jznxmqkP5md9SiznLh9ABqqrIyL ZDMD/uRempwWpzZ1HNMzIJzC5kUlx44An6yM3FlFiW8WMbiGcqrPcMyUZ+eh8TPWG15e 9ioH3uyuYpsUOGP/RDXGtXZLPhuZom8FTIJ5xst9Bd5UyQFp7axv6vKzucE01UgzCdpZ iAvHzg1wDAmNchgS9zLYPQpMTo+7Hu/T820O69daYEnVUpffA4JkIntlx1V+CGj/WLc3 iLb9LiTReOqKvuYh63xBi5hcARdjwOLwQyLJkDXgNaI/lmKRuNu4lBB2E+uVEZTlNznh oPNA== X-Gm-Message-State: AOAM533buHYGD38mT1YGiIEnIf9ScMRIlZOIrd5YojofXXUIdsg3GTvK Lv3chECZLKqbiZSy7GwP8DauKRDHxrs= X-Google-Smtp-Source: ABdhPJzNl2S46EHqqZRBThK05NpFOrHbnN1acRIyuHxtSxaFKOiWTYJ9WJg3seyn9Pnj67D5MjCSvA== X-Received: by 2002:a62:a20d:0:b029:35b:73da:dc8d with SMTP id m13-20020a62a20d0000b029035b73dadc8dmr897755pff.54.1631058804832; Tue, 07 Sep 2021 16:53:24 -0700 (PDT) Original-Received: from tim-desktop (106-69-66-54.dyn.iinet.net.au. [106.69.66.54]) by smtp.gmail.com with ESMTPSA id p16sm143438pjz.44.2021.09.07.16.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 16:53:23 -0700 (PDT) In-reply-to: Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:274297 Archived-At: Arthur Miller 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).